NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/56555: NetBSD/current fails to crossbuild to MacOS Monterey (Intel)



This diff fixes is for me.

Without any optimisation clang doesn't evaluate __builtin_constant_p and
doesn't optimise outthings like...

  { "TARGET_SVE && 64 >= 32",
    __builtin_constant_p
#line 8770
"/home/nick/netbsd/nbcvs/src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-sve.md"
(TARGET_SVE && 64 >= 32)
    ? (int)
#line 8770
"/home/nick/netbsd/nbcvs/src/external/gpl3/gcc/dist/gcc/config/aarch64/aarch64-sve.md"
(TARGET_SVE && 64 >= 32)
    : -1 },

...

Nick
Index: external/gpl3/gcc/usr.bin/backend/Makefile
===================================================================
RCS file: /cvsroot/src/external/gpl3/gcc/usr.bin/backend/Makefile,v
retrieving revision 1.66
diff -u -p -r1.66 Makefile
--- external/gpl3/gcc/usr.bin/backend/Makefile	18 Sep 2021 01:47:08 -0000	1.66
+++ external/gpl3/gcc/usr.bin/backend/Makefile	22 May 2022 15:54:36 -0000
@@ -67,7 +67,7 @@ COPTS.varasm.c=			-Wno-error
 # XXX Override the normal rule to use HOST_COMPILE.cc
 .c.lo:
 	${_MKTARGET_COMPILE}
-	${HOST_COMPILE.cc} -o ${.TARGET}.o ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
+	${HOST_COMPILE.cc} -O -o ${.TARGET}.o ${COPTS.${.IMPSRC:T}} ${CPUFLAGS.${.IMPSRC:T}} ${CPPFLAGS.${.IMPSRC:T}} ${.IMPSRC}
 	mv ${.TARGET}.o ${.TARGET}
 
 # Headers that host objects depend on (except gen*rtl*)


Home | Main Index | Thread Index | Old Index