Hi everybody
I've just installed the default lang/gcc package and
I'm surprised to have to add
Is there something wrong in my installation ?
Thank you a lot.
Cheers
Didier.
I've just installed the default lang/gcc package and
I'm surprised to have to add
-L/usr/lib
in order to ld: cannot find -lc
link error message to disappear.
Code:
$ gcc -print-search-dirs
install: /usr/local/lib/gcc10/gcc/x86_64-portbld-freebsd12.2/10.3.0/
programs: =/usr/local/libexec/gcc10/gcc/x86_64-portbld-freebsd12.2/10.3.0/:/usr/local/libexec/gcc10/gcc/x86_64-portbld-freebsd12.2/10.3.0/:
/usr/local/libexec/gcc10/gcc/x86_64-portbld-freebsd12.2/:/usr/local/lib/gcc10/gcc/x86_64-portbld-freebsd12.2/10.3.0/:/usr/local/lib/gcc10/g
cc/x86_64-portbld-freebsd12.2/:/usr/local/lib/gcc10/gcc/x86_64-portbld-freebsd12.2/10.3.0/../../../../../x86_64-portbld-freebsd12.2/bin/x86
_64-portbld-freebsd12.2/10.3.0/:/usr/local/lib/gcc10/gcc/x86_64-portbld-freebsd12.2/10.3.0/../../../../../x86_64-portbld-freebsd12.2/bin/
libraries: =/usr/local/lib/gcc10/gcc/x86_64-portbld-freebsd12.2/10.3.0/:/usr/local/lib/gcc10/gcc/x86_64-portbld-freebsd12.2/10.3.0/../../..
/../../x86_64-portbld-freebsd12.2/lib/x86_64-portbld-freebsd12.2/10.3.0/:/usr/local/lib/gcc10/gcc/x86_64-portbld-freebsd12.2/10.3.0/../../.
./../../x86_64-portbld-freebsd12.2/lib/:/usr/local/lib/gcc10/gcc/x86_64-portbld-freebsd12.2/10.3.0/../../../x86_64-portbld-freebsd12.2/10.3
.0/:/usr/local/lib/gcc10/gcc/x86_64-portbld-freebsd12.2/10.3.0/../../../:/lib/x86_64-portbld-freebsd12.2/10.3.0/:/lib/:/usr/lib/x86_64-port
bld-freebsd12.2/10.3.0/:/usr/lib/
Code:
$ gcc -dumpspecs
[...]
*link_command:
%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S: %(linker) %{!fno-use-linker-plugin:%{!fno-lto: -plugin %(linker_plugin_file) -plugin-
opt=%(lto_wrapper) -plugin-opt=-fresolution=%u.res %{flinker-output=*:-plugin-opt=-linker-output-known} %{!nostdlib:%{!nodefaul
tlibs:%:pass-through-libs(%(link_gcc_c_sequence))}} }}%{flto|flto=*:%<fcompare-debug*} %{flto} %{fno-lto} %{flto=*} %l %{static|sha
red|r:;pie:-pie} %{fuse-ld=*:-fuse-ld=%*} %{gz|gz=zlib:--compress-debug-sections=zlib} %{gz=none:--compress-debug-sections=none} %{gz=zlib
-gnu:--compress-debug-sections=zlib-gnu} %X %{o*} %{e*} %{N} %{n} %{r} %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!r:%{!nostartfiles:%S}}}
%{static|no-pie|static-pie:} %@{L*} %(mfwrap) %(link_libgcc) %{fvtable-verify=none:} %{fvtable-verify=std: %e-fvtable-verify=std is n
ot supported in this configuration} %{fvtable-verify=preinit: %e-fvtable-verify=preinit is not supported in this configuration} %{!nostdl
ib:%{!r:%{!nodefaultlibs:%{%:sanitize(address):} %{%:sanitize(thread):} %{%:sanitize(leak):}}}} %o %{fopenacc|fopenmp|%:gt(%{f
tree-parallelize-loops=*:%*} 1): %:include(libgomp.spec)%(link_gomp)} %{fgnu-tm:%:include(libitm.spec)%(link_itm)} %(mflib) %
{fsplit-stack: --wrap=pthread_create} %{fprofile-arcs|fprofile-generate*|coverage:-lgcov} %{!nostdlib:%{!r:%{!nodefaultlibs:%{%:sanitize
(address):%{static-libasan:-Bstatic} -lasan %{static-libasan:-Bdynamic} %{static-libasan|static:%:include(libsanitizer.spec)%(link_libasan)
} %{static:%ecannot specify -static with -fsanitize=address}} %{%:sanitize(thread):%{static-libtsan:-Bstatic} -ltsan %{static-libtsan
:-Bdynamic} %{static-libtsan|static:%:include(libsanitizer.spec)%(link_libtsan)} %{static:%ecannot specify -static with -fsanitize=threa
d}} %{%:sanitize(undefined):%{static-libubsan:-Bstatic} -lubsan %{static-libubsan:-Bdynamic} %{static-libubsan|static:%:include(libsanit
izer.spec)%(link_libubsan)}} %{%:sanitize(leak):%{static-liblsan:-Bstatic} -llsan %{static-liblsan:-Bdynamic} %{static-liblsan|static:%:
include(libsanitizer.spec)%(link_liblsan)}}}}} %{!nostdlib:%{!r:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}}} %{!nostdlib:%
{!r:%{!nostartfiles:%E}}} %{T*}
%(post_link) }}}}}}
Code:
$ ld --version
LLD 10.0.1 (FreeBSD llvmorg-10.0.1-0-gef32c611aa2-1200012) (compatible with GNU linkers)
Is there something wrong in my installation ?
Thank you a lot.
Cheers
Didier.