On Mon, 8 Sep 2025, Shiva Subramanian via Gcc-help wrote:
Hi team, I'm looking for some help - as suggested I successfully built GCC on Debian and gave it a shot on HPE Nonstop OSS. According to ./config.guess, my system was nsv-tandem-nskL25 so I had to run configure like below - ../configure \ --build=nsv-tandem-nskL25 \ --host=nsv-tandem-nskL25 \ --target=nsv-tandem-nskL25 \ --enable-languages=c,c++ \ --disable-multilib \ --disable-shared \ --prefix=$HOME/gcc-install \ CC="nscc -Wstd=c17" \ CXX="nscc -Wstd=c++17" \ LD=xld The CC, CXX & LD flags are my system specific - I also wanted to build GCC for C & C++ first before considering other languages. But it seems to fail at the below make step irrespective of what I do. make[3]: Entering directory '/home/shiva/gcc/build/libiberty' if [ x"-fPIC" != x ] && [ ! -d pic ]; then \ mkdir pic; \ else true; fi touch stamp-picdir if [ x"" != x ] && [ ! -d noasan ]; then \ mkdir noasan; \ else true; fi touch stamp-noasandir if [ x"-fPIC" != x ]; then \ nscc -Wstd=c17 -c -DHAVE_CONFIG_H -g -I. -I../../libiberty/../include -D_GNU_SOURCE -fPIC ../../libiberty/regex.c -o pic/regex.o; \ else true; fi nscc: illegal option -- f Makefile:1241: recipe for target 'regex.o' failed make[3]: *** [regex.o] Error 1 make[3]: Leaving directory '/home/shiva/gcc/build/libiberty' Makefile:14374: recipe for target 'all-stage1-libiberty' failed make[2]: *** [all-stage1-libiberty] Error 2 make[2]: Leaving directory '/home/shiva/gcc/build' Makefile:25592: recipe for target 'stage1-bubble' failed make[1]: *** [stage1-bubble] Error 2 make[1]: Leaving directory '/home/shiva/gcc/build' Makefile:1105: recipe for target 'all' failed make: *** [all] Error 2 /home/shiva/gcc/build: Unfortunately, our C compiler doesn't under the -fPIC flag - I've tried exporting PICFLAG variable as empty before configure or run it as a param to Make but neither worked. I wouldn't want to update the libiberty/Makefile manually so would appreciate any ideas.
I would work around that by wrapping your compiler in a script that ignoes -fPIC (or replaces it with -fpic or an option which passes it to your assembler ...) -- Andrew C. Aitchison Kendal, UK andrew@xxxxxxxxxxxxxxx