Skip to content

Commit 83a27c4

Browse files
ports: add WIP python3.8 port
Signed-off-by: Andy-Python-Programmer <[email protected]>
1 parent edb0d36 commit 83a27c4

File tree

3 files changed

+135
-0
lines changed

3 files changed

+135
-0
lines changed

bootstrap.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,18 @@ sources:
4747
patch-path-strip: 1
4848
version: '12.rolling'
4949

50+
- name: python
51+
subdir: 'bundled'
52+
patch-path-strip: 1
53+
git: 'https://github.com/python/cpython.git'
54+
tag: 'v3.8.2'
55+
version: '3.8.2'
56+
tools_required:
57+
- host-autoconf-v2.69
58+
- host-automake-v1.16
59+
regenerate:
60+
- args: ['autoreconf', '-f', '-i']
61+
5062
tools:
5163
- name: host-autoconf-v2.69
5264
source:
@@ -91,6 +103,17 @@ tools:
91103
- args: ['make', 'install-strip']
92104
- args: ['ln', '-sf', '@PREFIX@/share/aclocal-1.16', '@PREFIX@/share/aclocal']
93105

106+
- name: host-python
107+
from_source: python
108+
configure:
109+
- args:
110+
- '@THIS_SOURCE_DIR@/configure'
111+
- '--prefix=@PREFIX@'
112+
compile:
113+
- args: ['make', '-j@PARALLELISM@']
114+
install:
115+
- args: ['make', 'install']
116+
94117
- name: host-binutils
95118
from_source: binutils
96119
configure:
@@ -337,6 +360,35 @@ packages:
337360
- args: ['make']
338361
- args: ['make', 'DESTDIR=@THIS_COLLECT_DIR@', 'install-strip']
339362

363+
- name: python
364+
from_source: python
365+
tools_required:
366+
- host-gcc
367+
- host-python
368+
pkgs_required:
369+
- mlibc
370+
configure:
371+
- args:
372+
- '@THIS_SOURCE_DIR@/configure'
373+
- '--host=x86_64-aero'
374+
- '--build=x86_64-linux-gnu'
375+
- '--prefix=/usr'
376+
- '--enable-shared'
377+
- '--with-sysroot=@SYSROOT_DIR@' # Set libtool's lt_sysroot.
378+
- '--with-system-ffi'
379+
- '--with-system-expat'
380+
- '--disable-ipv6'
381+
- '--without-ensurepip'
382+
environ:
383+
CONFIG_SITE: '@SOURCE_ROOT@/extra-files/python/python-config-site'
384+
PKG_CONFIG_SYSROOT_DIR: '@BUILD_ROOT@/system-root'
385+
PKG_CONFIG_LIBDIR: '@BUILD_ROOT@/system-root/usr/lib/pkgconfig:@BUILD_ROOT@/system-root/usr/share/pkgconfig'
386+
build:
387+
- args: ['make', '-j@PARALLELISM@']
388+
- args: ['make', 'install']
389+
environ:
390+
DESTDIR: '@THIS_COLLECT_DIR@'
391+
340392
tasks:
341393
- name: sysroot
342394
pkgs_required:

extra-files/python/python-config-site

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
ac_cv_file__dev_ptmx=yes
2+
ac_cv_file__dev_ptc=no

patches/python/python.patch

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
From d413109d47cba4c05c48ff959850bef39bd1630e Mon Sep 17 00:00:00 2001
2+
From: Andy-Python-Programmer <[email protected]>
3+
Date: Sun, 2 Jan 2022 13:01:40 +1100
4+
Subject: [PATCH] config: add aero target
5+
6+
Signed-off-by: Andy-Python-Programmer <[email protected]>
7+
---
8+
config.sub | 2 +-
9+
configure.ac | 15 ++++++++++++++-
10+
2 files changed, 15 insertions(+), 2 deletions(-)
11+
12+
diff --git a/config.sub b/config.sub
13+
index ba37cf9..cea962e 100755
14+
--- a/config.sub
15+
+++ b/config.sub
16+
@@ -1394,7 +1394,7 @@ case $os in
17+
| -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
18+
| -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \
19+
| -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \
20+
- | -midnightbsd*)
21+
+ | -midnightbsd* | -aero*)
22+
# Remember, each alternative MUST END IN *, to match a version number.
23+
;;
24+
-qnx*)
25+
diff --git a/configure.ac b/configure.ac
26+
index e57ef7c..d686b36 100644
27+
--- a/configure.ac
28+
+++ b/configure.ac
29+
@@ -379,6 +379,9 @@ then
30+
*-*-cygwin*)
31+
ac_sys_system=Cygwin
32+
;;
33+
+ *-*-aero*)
34+
+ ac_sys_system=Aero
35+
+ ;;
36+
*-*-vxworks*)
37+
ac_sys_system=VxWorks
38+
;;
39+
@@ -431,6 +434,9 @@ if test "$cross_compiling" = yes; then
40+
*-*-vxworks*)
41+
_host_cpu=$host_cpu
42+
;;
43+
+ *-*-aero*)
44+
+ _host_cpu=$host_cpu
45+
+ ;;
46+
*)
47+
# for now, limit cross builds to known configurations
48+
MACHDEP="unknown"
49+
@@ -2641,6 +2647,9 @@ then
50+
CYGWIN*)
51+
LDSHARED="gcc -shared -Wl,--enable-auto-image-base"
52+
LDCXXSHARED="g++ -shared -Wl,--enable-auto-image-base";;
53+
+ Aero*)
54+
+ LDSHARED='$(CC) -shared'
55+
+ LDCXXSHARED='$(CXX) -shared';;
56+
*) LDSHARED="ld";;
57+
esac
58+
fi
59+
@@ -2677,7 +2686,9 @@ then
60+
else CCSHARED="-Kpic -belf"
61+
fi;;
62+
VxWorks*)
63+
- CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic"
64+
+ CCSHARED="-fpic -D__SO_PICABILINUX__ -ftls-model=global-dynamic";;
65+
+ Aero*)
66+
+ CCSHARED="-fPIC";;
67+
esac
68+
fi
69+
AC_MSG_RESULT($CCSHARED)
70+
@@ -2738,6 +2749,8 @@ then
71+
LINKFORSHARED='-Wl,-E -N 2048K';;
72+
VxWorks*)
73+
LINKFORSHARED='--export-dynamic';;
74+
+ Aero*)
75+
+ LINKFORSHARED='-export-dynamic';;
76+
esac
77+
fi
78+
AC_MSG_RESULT($LINKFORSHARED)
79+
--
80+
2.25.1
81+

0 commit comments

Comments
 (0)