crosstool-ng/scripts/build/companion_libs
Alexey Brodkin 5171b3033a newlib-nano: Create symlinks for nano-suffixed libs
If existing board's .specs are used for linking of a user's application,
then instead of normally used libs like libc.a & libstdc++.a might be
requested their "nano"-suffixed siblings: libc_nano.a, libstdc++_nano etc.

That way:
----------------------------->8---------------------------
%rename link_gcc_c_sequence	myboard_link_gcc_c_sequence

*myboard_libc:
%{!specs=nano.specs:-lc} %{specs=nano.specs:-lc_nano}

*link_gcc_c_sequence:
%(myboard_link_gcc_c_sequence) --start-group %G %(myboard_libc) --end-group
----------------------------->8---------------------------

Our companion newlib-nano libs are all built optimized for size, so we'd like
to use them for linking. But given linker will see "-lc_nano -lstdc++_nano"
on its command line non-suffixed libs will be ignored.

To solve it we create those "_nano"-suffixed libraries as simple symlinks to
existing libs..

Fixes https://github.com/crosstool-ng/crosstool-ng/issues/1458.

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2021-02-19 19:25:12 +03:00
..
050-zlib.sh Rename JOBSFLAGS -> CT_JOBSFLAGS 2019-04-04 18:57:42 -07:00
100-gmp.sh libgmp: Fix cross-canadian build for macOS 2020-12-23 18:34:08 +03:00
110-mpfr.sh Rename JOBSFLAGS -> CT_JOBSFLAGS 2019-04-04 18:57:42 -07:00
121-isl.sh Rename JOBSFLAGS -> CT_JOBSFLAGS 2019-04-04 18:57:42 -07:00
130-cloog.sh Rename JOBSFLAGS -> CT_JOBSFLAGS 2019-04-04 18:57:42 -07:00
140-mpc.sh Rename JOBSFLAGS -> CT_JOBSFLAGS 2019-04-04 18:57:42 -07:00
200-libelf.sh Avoid adding arch/cpu/tune flags for target to GCC build 2018-06-05 00:16:37 -07:00
210-expat.sh Rename JOBSFLAGS -> CT_JOBSFLAGS 2019-04-04 18:57:42 -07:00
220-ncurses.sh Rename JOBSFLAGS -> CT_JOBSFLAGS 2019-04-04 18:57:42 -07:00
320-libiconv.sh Rename JOBSFLAGS -> CT_JOBSFLAGS 2019-04-04 18:57:42 -07:00
330-gettext.sh Rename JOBSFLAGS -> CT_JOBSFLAGS 2019-04-04 18:57:42 -07:00
340-picolibc.sh picolibc: Build libstdc++ against picolibc if requested 2021-01-11 23:29:01 -08:00
350-newlib_nano.sh newlib-nano: Create symlinks for nano-suffixed libs 2021-02-19 19:25:12 +03:00
400-gnuprumcu.sh Add package with PRU linker scripts and headers 2021-01-19 21:18:55 +02:00