1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:48:10 +00:00
serenity/Ports/python-3.6/patches/0001-Adapt-configuration.patch
Sergey Bugaev 1d9a7b5143 Ports: Unhardcode Python configuration
This ensures that ./configure results are actually used by the build.
This way, Python picks up the new sizeof(time_t) (which is 8), and
the build succeeds.
2020-04-14 18:40:24 +02:00

146 lines
4.2 KiB
Diff

diff --git a/Makefile.pre.in b/Makefile.pre.in
index cd7d33d..7949077 100644
--- a/Makefile.pre.in
+++ b/Makefile.pre.in
@@ -470,7 +470,7 @@ DTRACE_DEPS = \
# Rules
# Default target
-all: @DEF_MAKE_ALL_RULE@
+all: build_all
build_all: $(BUILDPYTHON) oldsharedmods sharedmods gdbhooks Programs/_testembed python-config
# Compile a binary with profile guided optimization.
diff --git a/Modules/Setup.dist b/Modules/Setup.dist
index 8b87fc8..5d6f29f 100644
--- a/Modules/Setup.dist
+++ b/Modules/Setup.dist
@@ -122,7 +122,7 @@ _stat _stat.c # stat.h interface
time timemodule.c # -lm # time operations and variables
# access to ISO C locale support
-_locale _localemodule.c # -lintl
+#_locale _localemodule.c # -lintl
# Standard I/O baseline
_io -I$(srcdir)/Modules/_io _io/_iomodule.c _io/iobase.c _io/fileio.c _io/bytesio.c _io/bufferedio.c _io/textio.c _io/stringio.c
diff --git a/config.sub b/config.sub
index d654d03..ea26de9 100755
--- a/config.sub
+++ b/config.sub
@@ -1512,6 +1512,8 @@ case $os in
;;
-nacl*)
;;
+ -serenity*)
+ ;;
-none)
;;
*)
diff --git a/configure b/configure
index cf95b27..4e7241c 100755
--- a/configure
+++ b/configure
@@ -784,6 +784,7 @@ infodir
docdir
oldincludedir
includedir
+runstatedir
localstatedir
sharedstatedir
sysconfdir
@@ -894,6 +895,7 @@ datadir='${datarootdir}'
sysconfdir='${prefix}/etc'
sharedstatedir='${prefix}/com'
localstatedir='${prefix}/var'
+runstatedir='${localstatedir}/run'
includedir='${prefix}/include'
oldincludedir='/usr/include'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
@@ -1146,6 +1148,15 @@ do
| -silent | --silent | --silen | --sile | --sil)
silent=yes ;;
+ -runstatedir | --runstatedir | --runstatedi | --runstated \
+ | --runstate | --runstat | --runsta | --runst | --runs \
+ | --run | --ru | --r)
+ ac_prev=runstatedir ;;
+ -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
+ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \
+ | --run=* | --ru=* | --r=*)
+ runstatedir=$ac_optarg ;;
+
-sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
@@ -1283,7 +1294,7 @@ fi
for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
datadir sysconfdir sharedstatedir localstatedir includedir \
oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
- libdir localedir mandir
+ libdir localedir mandir runstatedir
do
eval ac_val=\$$ac_var
# Remove trailing slashes.
@@ -1436,6 +1447,7 @@ Fine tuning of the installation directories:
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
@@ -3250,7 +3261,10 @@ then
*-*-linux*)
ac_sys_system=Linux
;;
- *-*-cygwin*)
+ *-*-serenity*)
+ ac_sys_system=Serenity
+ ;;
+ *-*-cygwin*)
ac_sys_system=Cygwin
;;
*)
@@ -3295,6 +3309,9 @@ if test "$cross_compiling" = yes; then
_host_cpu=$host_cpu
esac
;;
+ *-*-serenity*)
+ _host_cpu=$host_cpu
+ ;;
*-*-cygwin*)
_host_cpu=
;;
@@ -7806,7 +7806,7 @@
sys/param.h sys/select.h sys/sendfile.h sys/socket.h sys/statvfs.h \
sys/stat.h sys/syscall.h sys/sys_domain.h sys/termio.h sys/time.h \
sys/times.h sys/types.h sys/uio.h sys/un.h sys/utsname.h sys/wait.h pty.h \
-libutil.h sys/resource.h netpacket/packet.h sysexits.h bluetooth.h \
+libutil.h netpacket/packet.h sysexits.h bluetooth.h \
linux/tipc.h linux/random.h spawn.h util.h alloca.h endian.h \
sys/endian.h
do :
index 1d63813..79bd3eb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -382,6 +382,9 @@ then
*-*-linux*)
ac_sys_system=Linux
;;
+ *-*-serenity*)
+ ac_sys_system=Serenity
+ ;;
*-*-cygwin*)
ac_sys_system=Cygwin
;;
@@ -427,6 +430,9 @@ if test "$cross_compiling" = yes; then
_host_cpu=$host_cpu
esac
;;
+ *-*-serenity*)
+ _host_cpu=$host_cpu
+ ;;
*-*-cygwin*)
_host_cpu=
;;