Bug 48904

Summary: x86_64-knetbsd-gnu fails to build
Product: gcc Reporter: Jorn Wolfgang Rennecke <amylaar>
Component: targetAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: aldot, dmalcolm, kristerw, thorpej
Priority: P3 Keywords: build
Version: 4.8.0   
Target Milestone: ---   
Host: Target: x86_64-knetbsd-gnu
Build: Known to work: 6.0
Known to fail: 4.7.0, 4.8.0, 4.9.0, 5.0 Last reconfirmed: 2015-04-22 00:00:00
Bug Depends on:    
Bug Blocks: 47093    
Attachments: A patch

Description Jorn Wolfgang Rennecke 2011-05-06 01:11:19 UTC
(SHLIB_LINK='/home/amylaar/pr46489/may4/multi/x86_64-knetbsd-gnu/./gcc/xgcc -B/home/amylaar/pr46489/may4/multi/x86_64-knetbsd-gnu/./gcc/ -O2  -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -Dinhibit_libc -shared -nodefaultlibs -Wl,--soname=@shlib_base_name@.so.1 -Wl,--version-script=@shlib_map_file@ -o @multilib_dir@/@shlib_base_name@.so.1.tmp @multilib_flags@ @shlib_objs@ -lc && rm -f @multilib_dir@/@shlib_base_name@.so && if [ -f @multilib_dir@/@shlib_base_name@.so.1 ]; then mv -f @multilib_dir@/@shlib_base_name@.so.1 @multilib_dir@/@shlib_base_name@.so.1.backup; else true; fi && mv @multilib_dir@/@shlib_base_name@.so.1.tmp @multilib_dir@/@shlib_base_name@.so.1 && ln -s @shlib_base_name@.so.1 @multilib_dir@/@shlib_base_name@.so'; \
        gcc   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual -Wstrict-prototypes -Wmissing-prototypes -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -Wold-style-definition -Wc++-compat -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../../gcc/gcc -I../../../gcc/gcc/. -I../../../gcc/gcc/../include -I../../../gcc/gcc/../libcpp/include -I/opt/cfarm/mpc/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.7.0\" -DDEFAULT_TARGET_MACHINE=\"x86_64-knetbsd-gnu\" -DSTANDARD_BINDIR_PREFIX=\"/usr/local/bin/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\"  `test "X${SHLIB_LINK}" = "X" || test "yes" != "yes" || echo "-DENABLE_SHARED_LIBGCC"` -DCONFIGURE_SPECS="\"\"" \
  -c ../../../gcc/gcc/gcc.c -o gcc.o)
../../../gcc/gcc/gcc.c:713:32: error: expected ‘,’ or ‘;’ before ‘GNU_USER_DYNAMIC_LINKER32’
make[2]: *** [gcc.o] Error 1
Comment 1 Jorn Wolfgang Rennecke 2012-09-21 16:44:48 UTC
The error looks like this now:

g++   -g -O2 -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE -DNATIVE_CROSS  -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=\"x86_64-knetbsd-gnu\" -DSTANDARD_B
INDIR_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:32:0,
                 from ../../../gcc/gcc/gcc.c:37:
../../../gcc/gcc/config/i386/gnu-user64.h:57:39: error: expected ‘,’ or ‘;’ before ‘GNU_USER_LINK_EMULATION64’
                   "%{" SPEC_64 ":-m " GNU_USER_LINK_EMULATION64 "} \
                                       ^
../../../gcc/gcc/config/i386/gnu-user64.h:70:19: note: in expansion of macro 'GNU_USER_TARGET_LINK_SPEC'
 #define LINK_SPEC GNU_USER_TARGET_LINK_SPEC
                   ^
../../../gcc/gcc/gcc.c:715:32: note: in expansion of macro 'LINK_SPEC'
 static const char *link_spec = LINK_SPEC;
                                ^
make[2]: *** [gcc.o] Error 1
Comment 2 H.J. Lu 2012-09-21 17:42:31 UTC
Created attachment 28244 [details]
A patch
Comment 3 Bernhard Reutner-Fischer 2015-04-22 19:22:26 UTC
confirmed.

PR target/48904: x86_64-knetbsd-gnu missing defs

2012-09-21  H.J. Lu  <hongjiu.lu@intel.com>

        * config.gcc (x86_64-*-knetbsd*-gnu): Add i386/knetbsd-gnu64.h.
        * config/i386/knetbsd-gnu64.h: New file
Comment 4 Bernhard Reutner-Fischer 2015-05-08 07:34:14 UTC
Author: aldot
Date: Fri May  8 07:33:42 2015
New Revision: 222903

URL: https://gcc.gnu.org/viewcvs?rev=222903&root=gcc&view=rev
Log:
PR target/48904 x86_64-knetbsd-gnu missing defs

2015-05-08  H.J. Lu  <hongjiu.lu@intel.com>
            Bernhard Reutner-Fischer  <aldot@gcc.gnu.org>

        PR target/48904
        * config.gcc (x86_64-*-knetbsd*-gnu): Add i386/knetbsd-gnu64.h.
        * config/i386/knetbsd-gnu64.h: New file.


Added:
    trunk/gcc/config/i386/knetbsd-gnu64.h
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config.gcc
Comment 5 Bernhard Reutner-Fischer 2015-05-08 07:51:34 UTC
Fixed on the trunk.
Comment 6 Eric Gallager 2018-05-07 20:21:52 UTC
(In reply to Bernhard Reutner-Fischer from comment #5)
> Fixed on the trunk.

If trunk was 6 at the time, then this bug is fixed overall, since no older branches are still open.