From 17ce4f48733cdefcd672f8ec5eb104c86984e492 Mon Sep 17 00:00:00 2001 From: Tulio Magno Quites Machado Filho Date: Tue, 8 Oct 2019 15:08:35 +0000 Subject: [PATCH] Change the library search path when using --with-advance-toolchain From: Tulio Magno Quites Machado Filho Remove all -L directories from LINK_OS_EXTRA_SPEC32 and LINK_OS_EXTRA_SPEC64 so that user directories specified at build time have higher preference over the advance toolchain libraries. Set MD_STARTFILE_PREFIX to $prefix/lib/ and MD_STARTFILE_PREFIX_1 to $at/lib/ so that a compiler library has preference over the Advance Toolchain libraries. * config.gcc: Move -L usage from LINK_OS_EXTRA_SPEC32 and LINK_OS_EXTRA_SPEC64 to MD_STARTFILE_PREFIX and MD_STARTFILE_PREFIX_1 when using --with-advance-toolchain. From-SVN: r276702 --- gcc/ChangeLog | 6 ++++++ gcc/config.gcc | 11 ++++++----- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 984a05d0756..bee94311e50 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2019-10-08 Tulio Magno Quites Machado Filho + + * config.gcc: Move -L usage from LINK_OS_EXTRA_SPEC32 and + LINK_OS_EXTRA_SPEC64 to MD_STARTFILE_PREFIX and + MD_STARTFILE_PREFIX_1 when using --with-advance-toolchain. + 2019-10-08 Richard Biener * tree-vectorizer.h (_stmt_vec_info::v_reduc_type): Remove. diff --git a/gcc/config.gcc b/gcc/config.gcc index 481bc9586a7..511aeb454bf 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -4782,14 +4782,12 @@ case "${target}" in echo "#undef LINK_OS_EXTRA_SPEC32" echo "#define LINK_OS_EXTRA_SPEC32" \ "\"%(link_os_new_dtags)" \ - "-rpath $prefix/lib -rpath $at/lib" \ - "-L $prefix/lib -L $at/lib\"" + "-rpath $prefix/lib -rpath $at/lib\"" echo echo "#undef LINK_OS_EXTRA_SPEC64" echo "#define LINK_OS_EXTRA_SPEC64" \ "\"%(link_os_new_dtags)" \ - "-rpath $prefix/lib64 -rpath $at/lib64" \ - "-L $prefix/lib64 -L $at/lib64\"" + "-rpath $prefix/lib64 -rpath $at/lib64\"" echo echo "#undef LINK_OS_NEW_DTAGS_SPEC" echo "#define LINK_OS_NEW_DTAGS_SPEC" \ @@ -4802,7 +4800,10 @@ case "${target}" in echo "#define MD_EXEC_PREFIX \"$at/bin/\"" echo echo "#undef MD_STARTFILE_PREFIX" - echo "#define MD_STARTFILE_PREFIX \"$at/lib/\"") \ + echo "#define MD_STARTFILE_PREFIX \"$prefix/lib/\"" + echo + echo "#undef MD_STARTFILE_PREFIX_1" + echo "#define MD_STARTFILE_PREFIX_1 \"$at/lib/\"") \ > advance-toolchain.h else echo "Unknown advance-toolchain $with_advance_toolchain" -- 2.30.2