diff -durP egcs-1.1.2/doconfig egcs-1.1.2-2/doconfig --- egcs-1.1.2/doconfig Wed Dec 31 18:00:00 1969 +++ egcs-1.1.2-2/doconfig Thu Jul 8 11:27:56 1999 @@ -0,0 +1,25 @@ +#!/bin/sh + +TARGET=${1-`arch`} +HOST=`arch` + +## Go for the cross-compile option +#ARCHS='-arch m68k -arch i386' + +## Build NS 3.x binaries on an OS4.x host +#STATIC='-static' + +CC="cc $STATIC $ARCHS -traditional-cpp" +CFLAGS="-O" +LIBCFLAGS="$CFLAGS -g" +CXXFLAGS="-O" +LIBCXXFLAGS="$CXXFLAGS -g" + +export CC CFLAGS LIBCFLAGS CXXFLAGS LIBCXXFLAGS + +set -x + +#echo "Configuring for ${TARGET}-next-nextstep3 target + +configure ${TARGET}-next-nextstep3 \ + --enable-version-specific-runtime-libs diff -durP egcs-1.1.2/gcc/config/nextstep.h egcs-1.1.2-2/gcc/config/nextstep.h --- egcs-1.1.2/gcc/config/nextstep.h Sat Dec 6 11:24:06 1997 +++ egcs-1.1.2-2/gcc/config/nextstep.h Thu Jul 8 13:18:35 1999 @@ -129,21 +129,51 @@ || !strcmp (STR, "bsd") \ || !strcmp (STR, "object") \ || !strcmp (STR, "ObjC") \ - || !strcmp (STR, "all_load")) + || !strcmp (STR, "all_load") \ + || !strcmp (STR, "static" )) /* Machine dependent ccp options. */ +/* OpenStep needs -D__STATIC__ as gcc doesn't do + -dynamic yet, -- Rex 990205 */ +/* Add NS_TARGET related to using -static or not -- Rex 990629 */ #undef CPP_SPEC +#if ( NS_TARGET >= 40) +#define CPP_SPEC "%{!dynamic|static: -D__STATIC__ } \ + %{dynamic:%e-dynamic code generatation not supported. } \ + %{static: -DNS_TARGET=32 } \ + %{!static: -DNS_TARGET=41 } \ + %{!traditional: -D__STDC_} \ + %{posixstrict:-D_POSIX_SOURCE} \ + %{!posixstrict:%{bsd:-D__STRICT_BSD__} \ + %{posix:-D_POSIX_SOURCE} \ + %{!ansi:-D_NEXT_SOURCE}} \ + %{MD:-MD %M} %{MMD:-MMD %M}" +#else #define CPP_SPEC "%{!traditional: -D__STDC__} \ %{posixstrict:-D_POSIX_SOURCE} \ %{!posixstrict:%{bsd:-D__STRICT_BSD__} \ %{posix:-D_POSIX_SOURCE} \ %{!ansi:-D_NEXT_SOURCE}} \ %{MD:-MD %M} %{MMD:-MMD %M}" +#endif /* Machine dependent ld options. */ #undef LINK_SPEC +/* -read_only_relocs For OpenStep 4.x gets rid of linker warnings -- Rex 990205 */ +#if ( NS_TARGET >= 40 ) +# define LINK_SPEC "%{Z} %{M} \ +%{!dynamic|static: -read_only_relocs suppress } \ +%{static: -U __dyld_func_lookup -static } \ +%{execute*} %{preload*} %{fvmlib*} \ +%{segalign*} %{seg1addr*} %{segaddr*} %{segprot*} \ +%{pagezero_size*} \ +%{seglinkedit*} %{noseglinkedit*} \ +%{sectcreate*} %{sectalign*} %{sectobjectsymbols}\ +%{segcreate*} %{Mach*} %{whyload} %{w} \ +%{sectorder*} %{whatsloaded} %{ObjC} %{all_load} %{object}" +#else #define LINK_SPEC "%{Z} %{M} \ %{execute*} %{preload*} %{fvmlib*} \ %{segalign*} %{seg1addr*} %{segaddr*} %{segprot*} \ @@ -152,15 +182,38 @@ %{sectcreate*} %{sectalign*} %{sectobjectsymbols}\ %{segcreate*} %{Mach*} %{whyload} %{w} \ %{sectorder*} %{whatsloaded} %{ObjC} %{all_load} %{object}" +#endif /* Machine dependent libraries. */ #undef LIB_SPEC -#define LIB_SPEC "%{!posix*:-lsys_s} %{posix*:-lposix}" - -/* We specify crt0.o as -lcrt0.o so that ld will search the library path. */ +#if ( NS_TARGET >= 40 ) +/* support for OpenStep 4.x -- Rex 990205 */ +#define LIB_SPEC \ + "%{!posix*:-lsys_s } \ + %{posix*:-lposix -U dyld_stub_binding_helper } " +#else +#define LIB_SPEC "%{!posix*:-lsys_s } %{posix*:-lposix }" +#endif +/* For NON-Openstep 4.x, we specify crt0.o as -lcrt0.o so that ld will search the library path. */ +/* For OpenStep 4.x, we + 1. specify crt1.o as -lcrt1.o so that ld will search the library path, + or + 2. we could alternatively put a copy of ctr1.o renamed as crt0.o in gcc's + private lib dir... + hmm... we'll go with 1 for now. -- Rex 990205 +*/ #undef STARTFILE_SPEC +#if ( NS_TARGET >= 40 ) +#define STARTFILE_SPEC \ + "%{!posix*:%{static:%{pg:-lgcrt0.o}} %{!static:%{pg:-lgcrt1.o}} } %{!pg: \ + %{p:%e-p profiling is no longer supported. Use -pg instead.} \ + %{!p:%{static:-lcrt0.o} %{!static:-lcrt1.o} }}\ + %{posix*:%{pg:-lgposixcrt0.o}%{!pg: \ + %{p:%e-p profiling is no longer supported. Use -pg instead.} \ + %{!p:-lposixcrt0.o}}}" +#else #define STARTFILE_SPEC \ "%{!posix*:%{pg:-lgcrt0.o}%{!pg: \ %{p:%e-p profiling is no longer supported. Use -pg instead.} \ @@ -168,6 +221,7 @@ %{posix*:%{pg:-lgposixcrt0.o}%{!pg: \ %{p:%e-p profiling is no longer supported. Use -pg instead.} \ %{!p:-lposixcrt0.o}}}" +#endif /* Allow #sscs (but don't do anything). */