Change the library search path when using --with-advance-toolchain
authorTulio Magno Quites Machado Filho <tuliom@linux.ibm.com>
Tue, 8 Oct 2019 15:08:35 +0000 (15:08 +0000)
committerSegher Boessenkool <segher@gcc.gnu.org>
Tue, 8 Oct 2019 15:08:35 +0000 (17:08 +0200)
From: Tulio Magno Quites Machado Filho <tuliom@linux.ibm.com>

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
gcc/config.gcc

index 984a05d..bee9431 100644 (file)
@@ -1,3 +1,9 @@
+2019-10-08  Tulio Magno Quites Machado Filho  <tuliom@linux.ibm.com>
+
+       * 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  <rguenther@suse.de>
 
        * tree-vectorizer.h (_stmt_vec_info::v_reduc_type): Remove.
index 481bc95..511aeb4 100644 (file)
@@ -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"