diff options
author | marcel <marcel@FreeBSD.org> | 2003-03-16 22:44:01 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2003-03-16 22:44:01 +0000 |
commit | e0730b13ea809de27aa094bf2db3f6731167d554 (patch) | |
tree | e3ef45d10d2084c9eadba6fffcb1214970e5f45c /gnu/lib/libobjc | |
parent | 2dbfd1f3ae4ce81bbea5261c2dd34c8ae78dd715 (diff) | |
download | FreeBSD-src-e0730b13ea809de27aa094bf2db3f6731167d554.zip FreeBSD-src-e0730b13ea809de27aa094bf2db3f6731167d554.tar.gz |
libobjc is linked against shared objects and since we don't have a
shared object of libobjc, we end up linking in from the archive
version. This is wrong, because we don't compile the archive version
suitable for inclusion in shared objects. On ia64 this causes actual
breakages. Compile the archive version with PIC on ia64 to avoid
the breakage there and also to avoid changing the status quo on
other architectures. If other architectures have the same problem,
we probably should start building a shared library. There's no
indication however that other architectures actually need it.
Building the archive version with PIC on ia64 does pessimize linking
complete binaries (ie fully archive), but we don't use Objective-C
ourselves and so far I haven't seen non-shared executables written
in Objective-C, so I'm sure this will be nothing but academic.
Trigger case: ports/lang/gnustep-base
Diffstat (limited to 'gnu/lib/libobjc')
-rw-r--r-- | gnu/lib/libobjc/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gnu/lib/libobjc/Makefile b/gnu/lib/libobjc/Makefile index b6af267..c8b29d6 100644 --- a/gnu/lib/libobjc/Makefile +++ b/gnu/lib/libobjc/Makefile @@ -18,6 +18,10 @@ INCS= encoding.h hash.h objc-api.h objc-list.h objc.h runtime.h \ sarray.h thr.h typedstream.h NXConstStr.h Object.h Protocol.h INCSDIR=${INCLUDEDIR}/objc +.if ${MACHINE_ARCH} == "ia64" +CFLAGS+= -fpic +.endif + CFLAGS+= -fgnu-runtime -DHAVE_GTHR_DEFAULT -DIN_TARGET_LIBS CFLAGS+= -I. -I${.CURDIR}/../../usr.bin/cc/cc_tools CFLAGS+= -I${OBJCDIR}/objc -I${OBJCDIR} |