pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

how to add linker path (or remove "-lgcc"?)



Hi,

is there a way to add a
  -L<dir>
option to every ld invocation, or to use a wrapper script to this
effect?

I had success with
    bmake LD=<path/to/wrapperscript>
but if I add "LD=<path/to/wrapperscript>" to mk.conf it apparently has
no effect (!?!).

Alternatively, how can I avoid "-lgcc" being added to linker
invocations?


Background: I am trying to install pkgin-0.9.1 on a Linux host (SuSE
10.0) using a non-pkgsrc self-bootstrapped gcc-4.7.4 at
/opt/gcc-4.7.4/{bin,lib,...}. Linking fails with 
    /usr/bin/ld: cannot find -lgcc
("-lgcc" apparently introduced by /opt/pkgsrc/share/mk/bsd.prog.mk). It
seems -lgcc is not really required for pkgin, but might be required for
other packages.

libgcc.a resides at /opt/gcc-4.7.4/lib/gcc/i686-pc-linux-gnu/4.7.4/, so
I would like to inject
    -L/opt/gcc-4.7.4/lib/gcc/i686-pc-linux-gnu/4.7.4
to ld invocations, preferably by configuring mk.conf.

Regards
Matthias Ferdinand


Home | Main Index | Thread Index | Old Index