From c6c2f3ad4a4cbec0784f95a975b4cb51ab087433 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Wed, 4 Nov 1998 06:17:44 +0000 Subject: [PATCH] * ltconfig.in: For sunos4 using GNU ld, set hardcode_minus_L to no. * ltmain.in: Add some hacks to make SunOS --enable-shared work when using GNU ld. --- ChangeLog | 7 +++++++ ltconfig.in | 5 ++++- ltmain.in | 9 +++++++-- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index de660eaa..55bb293b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1998-11-04 Ian Lance Taylor + + * ltconfig.in: For sunos4 using GNU ld, set hardcode_minus_L to + no. + * ltmain.in: Add some hacks to make SunOS --enable-shared work + when using GNU ld. + 1998-11-04 Alexandre Oliva * THANKS: Added Marc J. Fraioli diff --git a/ltconfig.in b/ltconfig.in index e98946bc..96f8091c 100755 --- a/ltconfig.in +++ b/ltconfig.in @@ -806,7 +806,10 @@ if test "$with_gnu_ld" = yes; then sunos4*) archive_cmds='$LD -assert pure-text -Bstatic -o $lib$libobjs' hardcode_direct=yes - hardcode_minus_L=yes + # The GNU linker will only hardcode -L options if -rpath is not + # used, but we will be using -rpath because we set + # hardcode_libdir_flag_spec below. + hardcode_minus_L=no hardcode_shlibpath_var=no ;; diff --git a/ltmain.in b/ltmain.in index f5f9de49..3965769c 100644 --- a/ltmain.in +++ b/ltmain.in @@ -885,6 +885,11 @@ compiler." if test "$hardcode_direct" = no; then compile_command="$compile_command $dir/$linklib" elif test "$hardcode_minus_L" = no; then + case "$host" in + *-*-sunos*) + compile_shlibpath="$compile_shlibpath$dir:" + ;; + esac compile_command="$compile_command -L$dir -l$name" elif test "$hardcode_shlibpath_var" = no; then compile_shlibpath="$compile_shlibpath$dir:" @@ -1193,8 +1198,8 @@ compiler." major= versuffix= verstring="0.0" - case "$version_type" in - sunos) + case "$host" in + *-*-sunos*) versuffix=".0.0" ;; esac