]> git.ipfire.org Git - thirdparty/gcc.git/commit - configure
LoongArch: Reimplement multilib build option handling.
authorYang Yujie <yangyujie@loongson.cn>
Wed, 13 Sep 2023 09:52:14 +0000 (17:52 +0800)
committerLulu Cheng <chenglulu@loongson.cn>
Fri, 15 Sep 2023 02:42:12 +0000 (10:42 +0800)
commit227b18f5d7616d6d34ac44836a8679de9b43c857
tree75ad60c6607ba1b19c07392d7f5806372c433c2e
parent68cb873fd360dbb64f2a6dfb28e79399ff99d07d
LoongArch: Reimplement multilib build option handling.

Library build options from --with-multilib-list used to be processed with
*self_spec, which missed the driver's initial canonicalization.  This
caused limitations on CFLAGS override and the use of driver-only options
like -m[no]-lsx.

The problem is solved by promoting the injection rules of --with-multilib-list
options to the first element of DRIVER_SELF_SPECS, to make them execute before
the canonialization.  The library-build options are also hard-coded in
the driver and can be used conveniently by the builders of other non-gcc
libraries via the use of -fmultiflags.

Bootstrapped and tested on loongarch64-linux-gnu.

ChangeLog:

* config-ml.in: Remove unneeded loongarch clause.
* configure.ac: Register custom makefile fragments mt-loongarch-*
for loongarch targets.
* configure: Regenerate.

config/ChangeLog:

* mt-loongarch-mlib: New file.  Pass -fmultiflags when building
target libraries (FLAGS_FOR_TARGET).
* mt-loongarch-elf: New file.
* mt-loongarch-gnu: New file.

gcc/ChangeLog:

* config.gcc: Pass the default ABI via TM_MULTILIB_CONFIG.
* config/loongarch/loongarch-driver.h: Invoke MLIB_SELF_SPECS
before the driver canonicalization routines.
* config/loongarch/loongarch.h: Move definitions of CC1_SPEC etc.
to loongarch-driver.h
* config/loongarch/t-linux: Move multilib-related definitions to
t-multilib.
* config/loongarch/t-multilib: New file.  Inject library build
options obtained from --with-multilib-list.
* config/loongarch/t-loongarch: Same.
12 files changed:
config-ml.in
config/mt-loongarch-elf [new file with mode: 0644]
config/mt-loongarch-gnu [new file with mode: 0644]
config/mt-loongarch-mlib [new file with mode: 0644]
configure
configure.ac
gcc/config.gcc
gcc/config/loongarch/loongarch-driver.h
gcc/config/loongarch/loongarch.h
gcc/config/loongarch/t-linux
gcc/config/loongarch/t-loongarch
gcc/config/loongarch/t-multilib [new file with mode: 0644]