On Sat, Jul 2, 2016 at 12:46 PM, Edgar Pettijohn
<[email protected]> wrote:
> I'm trying to build from source, but I'm getting the following error. I am
following instructions from release(8).
>
> cc -O2 -pipe -g -DHAVE_GTHR_DEFAULT -DIN_GCC -DIN_TARGET_LIBS -I.
-I/usr/src/gnu/usr.bin/cc/libobjc/../cc_tools
-I/usr/src/gnu/usr.bin/cc/libobjc/../../../gcc/libobjc/objc
-I/usr/src/gnu/usr.bin/cc/libobjc/../../../gcc/libobjc
-I/usr/src/gnu/usr.bin/cc/libobjc/../../../gcc/gcc/config
-I/usr/src/gnu/usr.bin/cc/libobjc/../../../gcc/gcc
-I/usr/src/gnu/usr.bin/cc/libobjc/../../../gcc/include -fexceptions
-frandom-seed=RepeatabilityConsideredGood -DIN_GCC -DHAVE_CONFIG_H
-DPREFIX="/usr" -DPIE_DEFAULT=1
-I/usr/src/gnu/usr.bin/cc/libobjc/obj/../cc_tools
-I/usr/src/gnu/usr.bin/cc/libobjc/../cc_tools
-I/usr/src/gnu/usr.bin/cc/libobjc/../../../gcc/gcc
-I/usr/src/gnu/usr.bin/cc/libobjc/../../../gcc/gcc/config
-I/usr/src/gnu/usr.bin/cc/libobjc/../../../gcc/include
-I/usr/src/gnu/usr.bin/cc/libobjc/../../../gcc/libcpp/include
-I/usr/src/gnu/usr.bin/cc/libobjc/../../../gcc/libdecnumber -fno-pie -c -g
/usr/src/gnu/usr.bin/cc/libobjc/../../../gcc/libobjc/init.c -o init.go
> make: don't know how to make linking.go (prerequisite of: libobjc_g.a)
> Stop in gnu/usr.bin/cc/libobjc
> *** Error 2 in gnu/lib (<bsd.subdir.mk>:48 'all')
> *** Error 1 in /usr/src (Makefile:81 'build')
>
> Any idea how to correct?
Remove the DEBUGLIBS assignment from your /etc/mk.conf: apparently no
one has built with that option since the switch to gcc 4, which tells
you how well tested it is.
If you are *actually using* the debug libs in /usr/lib/debug/ then
please describe how, and do so quickly, before I craft a diff to
completely delete support for that option and those libs
Here's the diff to make libobjc build with DEBUGLIBS sets...but this
won't get committed if we're just going to delete an obsolete option,
so speak up if you ACTUALLY USE THEM.
Philip Guenther
Index: Makefile
===================================================================
RCS file: /data/src/openbsd/src/gnu/usr.bin/cc/libobjc/Makefile,v
retrieving revision 1.3
diff -u -p -r1.3 Makefile
--- Makefile 1 Jul 2013 14:22:08 -0000 1.3
+++ Makefile 4 Jul 2016 03:34:48 -0000
@@ -67,6 +67,10 @@ LINK.m?= ${OBJC} ${OBJCFLAGS} ${LDFLAGS}
${COMPILE.m} ${.IMPSRC}
${AR} ${ARFLAGS} $@ $*.o
rm -f $*.o
+.m.go:
+ ${COMPILE.m} -g ${.IMPSRC} -o ${.TARGET}.o
+ ${LD} -X -r ${.TARGET}.o -o ${.TARGET}
+ rm -f ${.TARGET}.o
.m.po:
${COMPILE.m} -p ${.IMPSRC} -o ${.TARGET}.o
${LD} -X -r ${.TARGET}.o -o ${.TARGET}