Sunday, July 21, 2019

[macppc] lang/gcc/8: add crt* symbols

Hi,

(I know the timing is unfortunate due to gcc-8 being broken on amd64,
but the proposed changes only impact macppc).

php-7.3 is broken on macppc [0] because it is missing some
_savegpr_/_restgpr_ symbols coming from crt* in libgcc.a.

I'm proposing here a diff that adds additional symbols in libgcc.a,
fixing the php-7.3 build [1]. I've chosen to add them all to avoid
further issues in this regard.

Bumping SHARED_LIBS seems not needed as the additional symbols are not
added to them.

Comments/feedback are welcome,

Charlène.


[0]
http://build-failures.rhaalovely.net/powerpc/2019-04-14/lang/php/7.3.log
[1] https://bin.charlenew.xyz/php73.log.gz


Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/gcc/8/Makefile,v
retrieving revision 1.15
diff -u -p -u -p -r1.15 Makefile
--- Makefile 13 Jun 2019 17:00:47 -0000 1.15
+++ Makefile 21 Jul 2019 12:15:29 -0000
@@ -16,8 +16,8 @@ USE_LLD = No
DPB_PROPERTIES = parallel

V = 8.3.0
-REVISION = 1
-REVISION-libs = 2
+REVISION = 2
+REVISION-libs = 3
FULL_VERSION = $V
FULL_PKGVERSION = $V

Index: patches/patch-libgcc_config_host
===================================================================
RCS file: /cvs/ports/lang/gcc/8/patches/patch-libgcc_config_host,v
retrieving revision 1.1.1.1
diff -u -p -u -p -r1.1.1.1 patch-libgcc_config_host
--- patches/patch-libgcc_config_host 4 Jan 2019 15:50:39 -0000 1.1.1.1
+++ patches/patch-libgcc_config_host 21 Jul 2019 12:15:29 -0000
@@ -45,7 +45,7 @@ Index: libgcc/config.host
tmake_file="$tmake_file rs6000/t-netbsd rs6000/t-crtstuff"
+ ;;
+powerpc-*-openbsd*)
-+ tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff"
++ tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff rs6000/t-openbsd"
;;
powerpc-*-eabispe*)
tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-savresfgpr rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
Index: patches/patch-libgcc_config_rs6000_t-openbsd
===================================================================
RCS file: patches/patch-libgcc_config_rs6000_t-openbsd
diff -N patches/patch-libgcc_config_rs6000_t-openbsd
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-libgcc_config_rs6000_t-openbsd 21 Jul 2019 12:15:29 -0000
@@ -0,0 +1,20 @@
+$OpenBSD$
+
+Add crt* since some symbols are required by lang/php/7.3+
+
+Index: libgcc/config/rs6000/t-openbsd
+--- libgcc/config/rs6000/t-openbsd.orig
++++ libgcc/config/rs6000/t-openbsd
+@@ -0,0 +1,12 @@
++# already added in libgcc/config/rs6000/t-ppccomm
++# LIB2ADD = $(srcdir)/config/rs6000/tramp.S
++
++LIB2ADD_ST += \
++ $(srcdir)/config/rs6000/crtsavfpr.S \
++ $(srcdir)/config/rs6000/crtresfpr.S \
++ $(srcdir)/config/rs6000/crtsavgpr.S \
++ $(srcdir)/config/rs6000/crtresgpr.S \
++ $(srcdir)/config/rs6000/crtresxfpr.S \
++ $(srcdir)/config/rs6000/crtresxgpr.S \
++ $(srcdir)/config/rs6000/crtsavevr.S \
++ $(srcdir)/config/rs6000/crtrestvr.S

No comments:

Post a Comment