../../../gcc/gcc/gcc.c:684:31: error: ‘OBSD_LIB_SPEC’ undeclared here (not in a function) make[2]: *** [gcc.o] Error 1
The error looks like this now: g++ -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -fno-exceptions -fno-rtti -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common -DHAVE_CONFIG_H -I. -I. -I../../../gcc/gcc -I../../../gcc/gcc/. -I../../../gcc/gcc/../include -I../../../gcc/gcc/../libcpp/include -I../../../gcc/gcc/../libdecnumber -I../../../gcc/gcc/../libdecnumber/dpd -I../libdecnumber \ -DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/usr/local/lib/gcc/\" -DSTANDARD_LIBEXEC_PREFIX=\"/usr/local/libexec/gcc/\" -DDEFAULT_TARGET_VERSION=\"4.8.0\" -DDEFAULT_TARGET_MACHINE=\"i686-openbsd3.0\" -DSTANDARD_BINDIR_PREFIX=\"/usr/local/bin/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" `test "X${SHLIB}" = "X" || test "yes" != "yes" || echo "-DENABLE_SHARED_LIBGCC"` -DCONFIGURE_SPECS="\"\"" \ -c ../../../gcc/gcc/gcc.c -o gcc.o) In file included from ./tm.h:24:0, from ../../../gcc/gcc/gcc.c:37: ../../../gcc/gcc/config/openbsd.h:144:18: error: ‘OBSD_LIB_SPEC’ was not declared in this scope #define LIB_SPEC OBSD_LIB_SPEC ^ ../../../gcc/gcc/gcc.c:716:31: note: in expansion of macro 'LIB_SPEC' static const char *lib_spec = LIB_SPEC; ^ make[2]: *** [gcc.o] Error 1 rm gcj-dbtool.pod jcf-dump.pod gcj.pod cpp.pod fsf-funding.pod gij.pod gc-analyze.pod grmic.pod gccgo.pod gcc.pod gfortran.pod jv-convert.pod gfdl.pod gcov.pod make[2]: Leaving directory `/home/amylaar/fsf/multi/i686-openbsd3.0/gcc' make[1]: *** [all-gcc] Error 2 make[1]: Leaving directory `/home/amylaar/fsf/multi/i686-openbsd3.0'
I see 2 ways to fix this, fwiw: 1) diff --git a/gcc/config/openbsd-oldgas.h b/gcc/config/openbsd-oldgas.h index 04a4d37..0e2aebc 100644 --- a/gcc/config/openbsd-oldgas.h +++ b/gcc/config/openbsd-oldgas.h @@ -20,3 +20,6 @@ along with GCC; see the file COPYING3. If not see #define OBSD_OLD_GAS + +/* OpenBSD3.0 had no libpthread, pthreads lived in -lc_r */ +#define OBSD_LIB_SPEC "%{!shared:-lc%{pthread:_r}}" i.e. openbsd-oldgas.h is only used on i?86-*-openbsd2.*|i?86-*openbsd3.[0123] so is right on spot it seems. 2) Remove openbsd <= 3.3 support altogether since openbsd-3.3 was released May 1, 2003. This probably needs an announcement from Release Managers or something.
Author: aldot Date: Wed Apr 22 08:41:13 2015 New Revision: 222315 URL: https://gcc.gnu.org/viewcvs?rev=222315&root=gcc&view=rev Log: PR target/47098 OBSD_LIB_SPEC on i686-openbsd3 missing config-list.mk for i686-*-openbsd3.0 failed with: gcc/config/openbsd.h:143:18: error: ‘OBSD_LIB_SPEC’ was not declared in this scope #define LIB_SPEC OBSD_LIB_SPEC ^ gcc/gcc.c:879:31: note: in expansion of macro ‘LIB_SPEC’ static const char *lib_spec = LIB_SPEC; ^ make[2]: *** [gcc.o] Error 1 i.e. openbsd-oldgas.h is only used on i?86-*-openbsd2.*|i?86-*openbsd3.[0123] so add the OBSD_LIB_SPEC there Modified: trunk/gcc/ChangeLog trunk/gcc/config/openbsd-oldgas.h
Fixed on the trunk.
(In reply to Bernhard Reutner-Fischer from comment #4) > Fixed on the trunk. If trunk was 6 at the time, then this bug is fixed overall, since no older branches are still open.