On Sun, 14 Feb 2021, 07:46 Harsh Rathod via Gcc-help, <gcc-help@xxxxxxxxxxx> wrote: > I'm trying to build GCC 10.2 from source on Fedora 33 with the following > configuration: > [root@harshrathod gccgo]# ../gcc-10.2.0/configure --disable-shared > --enable-languages=go --disable-multilib --with-ld=/usr/bin/ld.gold > --enable-gold=yes > After configuration, I set up the $CXXFLAGS global variable: export > CXXFLAGS="-fPIC" > But still, I get the error on make: > /usr/bin/ld.gold: error: > /root/gccgo/x86_64-pc-linux-gnu/libstdc++-v3/src/.libs/libstdc++.a(cp-demangle.o): > requires unsupported dynamic reloc 11; recompile with -fPICcollect2: error: > ld returned 1 exit statusmake[3]: *** [Makefile:560: libcc1.la] Error > 1make[3]: Leaving directory '/root/gccgo/libcc1'make[2]: *** [Makefile:436: > all] Error 2make[2]: Leaving directory '/root/gccgo/libcc1'make[1]: *** > [Makefile:18941: all-libcc1] Error 2make[1]: Leaving directory > '/root/gccgo'make: *** [Makefile:1009: all] Error 2[root@harshrathod > gccgo]# requires unsupported dynamic reloc 11; recompile with -fPIC-bash: > requires: command not found-bash: recompile: command not > found[root@harshrathod gccgo]# > Even though I used the -fPIC flag, why do I still get this error? Did I > set the global variable wrong way? Yes. Makefiles do not use values from the environment by default. If you don't need libcc1 you can just configure with --disable-libcc1 to skip building it. Alternatively, --with-pic might help, or setting CXXFLAGS as a Make variable instead of environment variable might work: make CXXFLAGS="-fPIC -O2 -g" >