Opened 5 years ago

Last modified 5 years ago

#773 new defect

Ancient coastline GCC won't build for MIPS

Reported by: Jakub Jermář Owned by:
Priority: major Milestone:
Component: coastline Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

The mips build of gcc errs with the following error:

mips-helenos-cc   -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 -Wold-style-definition -Wc++-compat   -DHAVE_CONFIG_H  -o xgcc gcc.o opts-common.o gcc-options.o diagnostic.o pretty-print.o input.o vec.o ggc-none.o \
  gccspec.o intl.o prefix.o version.o  ../libcpp/libcpp.a  -liconv ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a 
/usr/local/cross/lib/gcc/mips-helenos/8.2.0/../../../../mips-helenos/bin/ld: gcc.o:(.data.rel.ro+0x74): undefined reference to `host_detect_local_cpu'

This comment here suggests that gcc thinks it is building natively on a mips system. Also see helenos.h.

Change History (4)

comment:1 by Jakub Jermář, 5 years ago

Summary: GCC build on mips attempts to detect host cpu featuresGCC build for mips attempts to detect host cpu features

comment:2 by Jiří Zárevúcky, 5 years ago

Owner: set to Jiří Zárevúcky
Status: newassigned

comment:3 by Jiří Zárevúcky, 5 years ago

Owner: Jiří Zárevúcky removed
Status: assignednew

The issue here is that the ancient coastline GCC is not patched enough for MIPS. Coincidentally, HelenOS/gcc had the same issue, but it only occurs when cross-compiling a native compiler (as opposed to native-compiling a cross-compiler, which is what we do normally).

I fixed it in our GCC 8.2 (which currently doesn't make any difference), but to fix coastline GCC that one needs to be patched as well. Frankly, I don't think it's worth the effort, and the coastline GCC should probably remain broken until the package is updated to use our most recent git version. But if someone else feels like it's worthwhile to be fixing the old one, feel free. Just applying the same fix to gcc/config/mips/gnu-user.h should do the trick.

Otherwise, wontfix.

comment:4 by Jiří Zárevúcky, 5 years ago

Summary: GCC build for mips attempts to detect host cpu featuresAncient coastline GCC won't build for MIPS
Note: See TracTickets for help on using tickets.