Re: [PATCHv2] Change the library search path when using --with-advance-toolchain

2019-10-23 Thread Peter Bergner
On 10/5/19 12:20 PM, Segher Boessenkool wrote:
> On Fri, Oct 04, 2019 at 06:31:34PM -0300, Tulio Magno Quites Machado Filho 
> wrote:
>> 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.
> 
> This is fine, approved for all branches.  Thank you!  And thanks to Mike
> for the testing.

I've committed the back ports to the FSF 7, 8 and 9 branches now after
clean bootstraps and regtesting.

Peter




Re: [PATCHv2] Change the library search path when using --with-advance-toolchain

2019-10-08 Thread Segher Boessenkool
On Fri, Oct 04, 2019 at 06:31:34PM -0300, Tulio Magno Quites Machado Filho 
wrote:
> 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.
> 
> 2019-10-04  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.

Committed ( https://gcc.gnu.org/r276702 ).  Thanks!


Segher


Re: [PATCHv2] Change the library search path when using --with-advance-toolchain

2019-10-07 Thread Michael Meissner
On Fri, Oct 04, 2019 at 06:31:34PM -0300, Tulio Magno Quites Machado Filho 
wrote:
> Michael Meissner  writes:
> 
> > And then I built Spec 2006 and 2017 with my normal options on a power8 
> > system
> > running Ubuntu and an older set of host libraries.  If I have this patch
> > installed, it breaks linking some/all of the C++ and Fortran benchmarks,
> > because it finds the host C++/Fortran libraries before the AT 12.0 
> > libraries.
> 
> You have an usecase where the compiler has a different prefix.
> That requires an extra library directory, but it still has to come after
> the user lib directory.

Once I fixed the perl script to remove the extra -L's from the spec config.cfg
file that the perl script had put in for the previous version of
--with-advance-toolchain=, I was able to link one of the problematical
benchmarks (2017 roms_r in this case).

-- 
Michael Meissner, IBM
IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA
email: meiss...@linux.ibm.com, phone: +1 (978) 899-4797


Re: [PATCHv2] Change the library search path when using --with-advance-toolchain

2019-10-05 Thread Segher Boessenkool
On Fri, Oct 04, 2019 at 06:31:34PM -0300, Tulio Magno Quites Machado Filho 
wrote:
> 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.

This is fine, approved for all branches.  Thank you!  And thanks to Mike
for the testing.


Segher


> 2019-10-04  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.


[PATCHv2] Change the library search path when using --with-advance-toolchain

2019-10-04 Thread Tulio Magno Quites Machado Filho
Michael Meissner  writes:

> And then I built Spec 2006 and 2017 with my normal options on a power8 system
> running Ubuntu and an older set of host libraries.  If I have this patch
> installed, it breaks linking some/all of the C++ and Fortran benchmarks,
> because it finds the host C++/Fortran libraries before the AT 12.0 libraries.

You have an usecase where the compiler has a different prefix.
That requires an extra library directory, but it still has to come after
the user lib directory.

---8<---

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.

2019-10-04  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.
---
 gcc/config.gcc | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

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.14.5