Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Jul 2003 00:06:30 +0200
From:      Stefan Farfeleder <stefan@fafoe.narf.at>
To:        freebsd-ppc@freebsd.org
Subject:   diff to fix GCC build problems
Message-ID:  <20030715220630.GH574@wombat.fafoe.narf.at>

next in thread | raw e-mail | index | archive | help

--+HP7ph2BbKc20aGI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Hi,

in the latest GCC import the file config/rs6000/rs6000-c.c was added to
GCC, and the PowerPC cross-build from i386 currently fails because the
file is needed but missing from the Makefile in gnu/usr.bin/cc/cc_int:

%%
cc -O -pipe -DIN_GCC -DHAVE_CONFIG_H -DPREFIX=\"/freebsd/ppc-uchar/obj/powerpc/freebsd/ppc-uchar/src/i386/usr\" -DCROSS_COMPILE -I/freebsd/ppc-uchar/obj/powerpc/freebsd/ppc-uchar/src/i386/freebsd/ppc-uchar/src/gnu/usr.bin/cc/cc1/../cc_tools -I/freebsd/ppc-uchar/src/gnu/usr.bin/cc/cc1/../cc_tools -I/freebsd/ppc-uchar/src/gnu/usr.bin/cc/cc1/../../../../contrib/gcc -I/freebsd/ppc-uchar/src/gnu/usr.bin/cc/cc1/../../../../contrib/gcc/config -I.     -I/freebsd/ppc-uchar/obj/powerpc/freebsd/ppc-uchar/src/i386/legacy/usr/include  -static -L/freebsd/ppc-uchar/obj/powerpc/freebsd/ppc-uchar/src/i386/legacy/usr/lib -o cc1 main.o c-parse+%DIKED.o c-lang.o c-decl.o c-opts.o /freebsd/ppc-uchar/obj/powerpc/freebsd/ppc-uchar/src/i386/freebsd/ppc-uchar/src/gnu/usr.bin/cc/cc1/../cc_int/libcc_int.a -legacy
/freebsd/ppc-uchar/obj/powerpc/freebsd/ppc-uchar/src/i386/freebsd/ppc-uchar/src/gnu/usr.bin/cc/cc1/../cc_int/libcc_int.a(c-pragma.o): In function `init_pragma':
c-pragma.o(.text+0x6a8): undefined reference to `rs6000_pragma_longcall'
/freebsd/ppc-uchar/obj/powerpc/freebsd/ppc-uchar/src/i386/freebsd/ppc-uchar/src/gnu/usr.bin/cc/cc1/../cc_int/libcc_int.a(c-common.o): In function `cb_register_builtins':
c-common.o(.text+0x8009): undefined reference to `rs6000_cpu_cpp_builtins'
*** Error code 1
%%

Attached is a diff to add the file.  I've taken a more generic approach
than just doing .if ${GCC_CPU} == "rs6000" as this looks like a
consistent naming scheme;  ia64/ia64-c.c exists but doesn't seem to be
needed at the moment.  I'd be glad if someone could check whether the
diff doesn't break ia64 though.

Regards,
Stefan Farfeleder

--+HP7ph2BbKc20aGI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="gcc-Makefile.diff"

Index: src/gnu/usr.bin/cc/cc_int/Makefile
===================================================================
RCS file: /usr/home/ncvs/src/gnu/usr.bin/cc/cc_int/Makefile,v
retrieving revision 1.34
diff -u -r1.34 Makefile
--- src/gnu/usr.bin/cc/cc_int/Makefile	11 Jul 2003 05:37:23 -0000	1.34
+++ src/gnu/usr.bin/cc/cc_int/Makefile	15 Jul 2003 21:26:53 -0000
@@ -27,6 +27,10 @@
 	attribs.c cselib.c debug.c rtl-error.c tree-dump.c tree-inline.c
 
 SRCS+=	${GCC_CPU}.c
+.if exists(${GCC_CPU}-c.c)
+SRCS+=	${GCC_CPU}-c.c
+.endif
+
 
 SRCS+=	bb-reorder.c conflict.c ggc-common.c \
 	ggc-page.c ifcvt.c lists.c predict.c regrename.c resource.c sibcall.c \

--+HP7ph2BbKc20aGI--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030715220630.GH574>