|
Removed
Link Here
|
| 1 |
--- src/shobj-conf.orig 2015-12-24 18:12:47 UTC |
| 2 |
+++ src/shobj-conf |
| 3 |
@@ -10,21 +10,23 @@ |
| 4 |
# Chet Ramey |
| 5 |
# chet@po.cwru.edu |
| 6 |
|
| 7 |
-# Copyright (C) 1996-2002 Free Software Foundation, Inc. |
| 8 |
+# Copyright (C) 1996-2014 Free Software Foundation, Inc. |
| 9 |
# |
| 10 |
-# This program is free software; you can redistribute it and/or modify |
| 11 |
-# it under the terms of the GNU General Public License as published by |
| 12 |
-# the Free Software Foundation; either version 2, or (at your option) |
| 13 |
-# any later version. |
| 14 |
+# This file is part of GNU Bash, the Bourne Again SHell. |
| 15 |
# |
| 16 |
-# This program is distributed in the hope that it will be useful, |
| 17 |
-# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 18 |
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 19 |
-# GNU General Public License for more details. |
| 20 |
+# This program is free software: you can redistribute it and/or modify |
| 21 |
+# it under the terms of the GNU General Public License as published by |
| 22 |
+# the Free Software Foundation, either version 3 of the License, or |
| 23 |
+# (at your option) any later version. |
| 24 |
+# |
| 25 |
+# This program is distributed in the hope that it will be useful, |
| 26 |
+# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 27 |
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 28 |
+# GNU General Public License for more details. |
| 29 |
+# |
| 30 |
+# You should have received a copy of the GNU General Public License |
| 31 |
+# along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 32 |
# |
| 33 |
-# You should have received a copy of the GNU General Public License |
| 34 |
-# along with this program; if not, write to the Free Software |
| 35 |
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111 USA. |
| 36 |
|
| 37 |
# |
| 38 |
# defaults |
| 39 |
@@ -62,7 +64,21 @@ while [ $# -gt 0 ]; do |
| 40 |
esac |
| 41 |
done |
| 42 |
|
| 43 |
-case "${host_os}-${SHOBJ_CC}" in |
| 44 |
+case "${host_os}-${SHOBJ_CC}-${host_vendor}" in |
| 45 |
+nsk-cc-tandem) |
| 46 |
+ SHOBJ_CFLAGS=-Wglobalized |
| 47 |
+ case `uname -m` in |
| 48 |
+ NSR*) |
| 49 |
+ SHOBJ_CFLAGS="${SHOBJ_CFLAGS} -Wcall_shared" # default on TNS/E, needed on TNS/R |
| 50 |
+ SHOBJ_LD=/usr/bin/ld # for TNS/R |
| 51 |
+ ;; |
| 52 |
+ NSE*|NEO*) |
| 53 |
+ SHOBJ_LD=/usr/bin/eld |
| 54 |
+ ;; |
| 55 |
+ esac |
| 56 |
+ SHOBJ_LDFLAGS='-shared -bglobalized -unres_symbols ignore' |
| 57 |
+ ;; |
| 58 |
+ |
| 59 |
sunos4*-*gcc*) |
| 60 |
SHOBJ_CFLAGS=-fpic |
| 61 |
SHOBJ_LD=/usr/bin/ld |
| 62 |
@@ -80,15 +96,17 @@ sunos4*) |
| 63 |
;; |
| 64 |
|
| 65 |
sunos5*-*gcc*|solaris2*-*gcc*) |
| 66 |
- SHOBJ_CFLAGS=-fpic |
| 67 |
SHOBJ_LD='${CC}' |
| 68 |
ld_used=`gcc -print-prog-name=ld` |
| 69 |
if ${ld_used} -V 2>&1 | grep GNU >/dev/null 2>&1; then |
| 70 |
# This line works for the GNU ld |
| 71 |
SHOBJ_LDFLAGS='-shared -Wl,-h,$@' |
| 72 |
+ # http://sourceware.org/ml/binutils/2001-08/msg00361.html |
| 73 |
+ SHOBJ_CFLAGS=-fPIC |
| 74 |
else |
| 75 |
# This line works for the Solaris linker in /usr/ccs/bin/ld |
| 76 |
SHOBJ_LDFLAGS='-shared -Wl,-i -Wl,-h,$@' |
| 77 |
+ SHOBJ_CFLAGS=-fpic |
| 78 |
fi |
| 79 |
|
| 80 |
# SHLIB_XLDFLAGS='-R $(libdir)' |
| 81 |
@@ -104,8 +122,8 @@ sunos5*|solaris2*) |
| 82 |
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' |
| 83 |
;; |
| 84 |
|
| 85 |
-# All versions of Linux or the semi-mythical GNU Hurd. |
| 86 |
-linux*-*|gnu*-*|k*bsd*-gnu-*) |
| 87 |
+# All versions of Linux (including Gentoo/FreeBSD) or the semi-mythical GNU Hurd. |
| 88 |
+linux*-*|gnu*-*|k*bsd*-gnu-*|freebsd*-gentoo) |
| 89 |
SHOBJ_CFLAGS=-fPIC |
| 90 |
SHOBJ_LD='${CC}' |
| 91 |
SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' |
| 92 |
@@ -114,7 +132,7 @@ linux*-*|gnu*-*|k*bsd*-gnu-*) |
| 93 |
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)$(SHLIB_MINOR)' |
| 94 |
;; |
| 95 |
|
| 96 |
-freebsd2* | netbsd*) |
| 97 |
+freebsd2*) |
| 98 |
SHOBJ_CFLAGS=-fpic |
| 99 |
SHOBJ_LD=ld |
| 100 |
SHOBJ_LDFLAGS='-x -Bshareable' |
| 101 |
@@ -124,8 +142,8 @@ freebsd2* | netbsd*) |
| 102 |
;; |
| 103 |
|
| 104 |
# FreeBSD-3.x ELF |
| 105 |
-freebsd[3-9]*|freebsdelf[3-9]*|freebsdaout[3-9]*|dragonfly*) |
| 106 |
- SHOBJ_CFLAGS=-fpic |
| 107 |
+freebsd3*|freebsdaout*) |
| 108 |
+ SHOBJ_CFLAGS=-fPIC |
| 109 |
SHOBJ_LD='${CC}' |
| 110 |
|
| 111 |
if [ -x /usr/bin/objformat ] && [ "`/usr/bin/objformat`" = "elf" ]; then |
| 112 |
@@ -141,39 +159,20 @@ freebsd[3-9]*|freebsdelf[3-9]*|freebsdao |
| 113 |
fi |
| 114 |
;; |
| 115 |
|
| 116 |
-# Darwin/MacOS X |
| 117 |
-darwin1*) |
| 118 |
- SHOBJ_STATUS=supported |
| 119 |
- SHLIB_STATUS=supported |
| 120 |
- |
| 121 |
- SHOBJ_CFLAGS='' |
| 122 |
- SHLIB_LIBSUFF='dylib' |
| 123 |
- |
| 124 |
+# FreeBSD-4.x and later have only ELF |
| 125 |
+freebsd[4-9]*|freebsd1[0-9]*|freebsdelf*|dragonfly*) |
| 126 |
+ SHOBJ_CFLAGS=-fPIC |
| 127 |
SHOBJ_LD='${CC}' |
| 128 |
- SHOBJ_LDFLAGS='-dynamiclib' |
| 129 |
- ;; |
| 130 |
|
| 131 |
-darwin8*) |
| 132 |
- SHOBJ_STATUS=supported |
| 133 |
- SHLIB_STATUS=supported |
| 134 |
- |
| 135 |
- SHOBJ_CFLAGS='-fno-common' |
| 136 |
- |
| 137 |
- SHOBJ_LD='MACOSX_DEPLOYMENT_TARGET=10.3 ${CC}' |
| 138 |
- |
| 139 |
- SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' |
| 140 |
- SHLIB_LIBSUFF='dylib' |
| 141 |
- |
| 142 |
- SHOBJ_LDFLAGS='-undefined dynamic_lookup' |
| 143 |
- SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' |
| 144 |
+ SHOBJ_LDFLAGS='-shared -Wl,-soname,$@' |
| 145 |
+ SHLIB_XLDFLAGS='-Wl,-rpath,$(libdir)' |
| 146 |
|
| 147 |
- SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1 |
| 148 |
+ SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' |
| 149 |
;; |
| 150 |
|
| 151 |
-darwin*|macosx*) |
| 152 |
- SHOBJ_STATUS=unsupported |
| 153 |
- SHLIB_STATUS=supported |
| 154 |
- |
| 155 |
+# Darwin/MacOS X |
| 156 |
+darwin*) |
| 157 |
+ # Common definitions for all darwin/mac os x versions |
| 158 |
SHOBJ_CFLAGS='-fno-common' |
| 159 |
|
| 160 |
SHOBJ_LD='${CC}' |
| 161 |
@@ -181,19 +180,39 @@ darwin*|macosx*) |
| 162 |
SHLIB_LIBVERSION='$(SHLIB_MAJOR)$(SHLIB_MINOR).$(SHLIB_LIBSUFF)' |
| 163 |
SHLIB_LIBSUFF='dylib' |
| 164 |
|
| 165 |
+ # unused at this time |
| 166 |
+ SHLIB_SONAME='$(libdir)/`echo $@ | sed "s:\\..*::"`.$(SHLIB_MAJOR).$(SHLIB_LIBSUFF)' |
| 167 |
+ |
| 168 |
case "${host_os}" in |
| 169 |
- darwin[78]*) SHOBJ_LDFLAGS='' |
| 170 |
- SHLIB_XLDFLAGS='-dynamiclib -arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' |
| 171 |
+ # Darwin versions 1, 5, 6, 7 correspond to Mac OS X 10.0, 10.1, 10.2, |
| 172 |
+ # and 10.3, respectively. |
| 173 |
+ darwin[1-7].*) |
| 174 |
+ SHOBJ_STATUS=unsupported |
| 175 |
+ SHOBJ_LDFLAGS='-dynamic' |
| 176 |
+ SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/`echo $@ | sed "s:\\..*::"`.$(SHLIB_MAJOR).$(SHLIB_LIBSUFF) -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' |
| 177 |
+ ;; |
| 178 |
+ # Darwin 8 == Mac OS X 10.4; Mac OS X 10.N == Darwin N+4 |
| 179 |
+ *) |
| 180 |
+ case "${host_os}" in |
| 181 |
+ darwin[89]*|darwin1[012]*) |
| 182 |
+ SHOBJ_ARCHFLAGS='-arch_only `/usr/bin/arch`' |
| 183 |
;; |
| 184 |
- *) SHOBJ_LDFLAGS='-dynamic' |
| 185 |
- SHLIB_XLDFLAGS='-arch_only `/usr/bin/arch` -install_name $(libdir)/$@ -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' |
| 186 |
+ *) # Mac OS X 10.9 (Mavericks) and later |
| 187 |
+ SHOBJ_ARCHFLAGS= |
| 188 |
+ # for 32 and 64bit universal library |
| 189 |
+ #SHOBJ_ARCHFLAGS='-arch i386 -arch x86_64' |
| 190 |
+ #SHOBJ_CFLAGS=${SHOBJ_CFLAGS}' -arch i386 -arch x86_64' |
| 191 |
;; |
| 192 |
+ esac |
| 193 |
+ SHOBJ_LDFLAGS="-dynamiclib -dynamic -undefined dynamic_lookup ${SHOBJ_ARCHFLAGS}" |
| 194 |
+ SHLIB_XLDFLAGS="-dynamiclib ${SHOBJ_ARCHFLAGS}"' -install_name $(libdir)/`echo $@ | sed "s:\\..*::"`.$(SHLIB_MAJOR).$(SHLIB_LIBSUFF) -current_version $(SHLIB_MAJOR)$(SHLIB_MINOR) -compatibility_version $(SHLIB_MAJOR) -v' |
| 195 |
+ ;; |
| 196 |
esac |
| 197 |
|
| 198 |
SHLIB_LIBS='-lncurses' # see if -lcurses works on MacOS X 10.1 |
| 199 |
;; |
| 200 |
|
| 201 |
-openbsd*) |
| 202 |
+openbsd*|netbsd*|mirbsd*) |
| 203 |
SHOBJ_CFLAGS=-fPIC |
| 204 |
SHOBJ_LD='${CC}' |
| 205 |
SHOBJ_LDFLAGS='-shared' |
| 206 |
@@ -258,7 +277,7 @@ osf*) |
| 207 |
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' |
| 208 |
;; |
| 209 |
|
| 210 |
-aix4.[2-9]*-*gcc*) # lightly tested by jik@cisco.com |
| 211 |
+aix4.[2-9]*-*gcc*|aix[5-9].*-*gcc*) # lightly tested by jik@cisco.com |
| 212 |
SHOBJ_CFLAGS=-fpic |
| 213 |
SHOBJ_LD='ld' |
| 214 |
SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall' |
| 215 |
@@ -269,7 +288,7 @@ aix4.[2-9]*-*gcc*) # lightly tested by |
| 216 |
SHLIB_LIBVERSION='$(SHLIB_LIBSUFF).$(SHLIB_MAJOR)' |
| 217 |
;; |
| 218 |
|
| 219 |
-aix4.[2-9]*) |
| 220 |
+aix4.[2-9]*|aix[5-9].*) |
| 221 |
SHOBJ_CFLAGS=-K |
| 222 |
SHOBJ_LD='ld' |
| 223 |
SHOBJ_LDFLAGS='-bdynamic -bnoentry -bexpall' |
| 224 |
@@ -340,7 +359,7 @@ hpux10*-*gcc*) |
| 225 |
SHOBJ_LD='${CC}' |
| 226 |
# if you have problems linking here, moving the `-Wl,+h,$@' from |
| 227 |
# SHLIB_XLDFLAGS to SHOBJ_LDFLAGS has been reported to work |
| 228 |
- SHOBJ_LDFLAGS='-shared -Wl,-b -Wl,+s' |
| 229 |
+ SHOBJ_LDFLAGS='-shared -fpic -Wl,-b -Wl,+s' |
| 230 |
|
| 231 |
SHLIB_XLDFLAGS='-Wl,+h,$@ -Wl,+b,$(libdir)' |
| 232 |
SHLIB_LIBSUFF='sl' |
| 233 |
@@ -500,20 +519,37 @@ msdos*) |
| 234 |
|
| 235 |
cygwin*) |
| 236 |
SHOBJ_LD='$(CC)' |
| 237 |
- SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a' |
| 238 |
- SHLIB_LIBPREF='cyg' |
| 239 |
- SHLIB_LIBSUFF='dll' |
| 240 |
- SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)' |
| 241 |
- SHLIB_LIBS='$(TERMCAP_LIB)' |
| 242 |
+ SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a' |
| 243 |
+ SHLIB_LIBPREF='cyg' |
| 244 |
+ SHLIB_LIBSUFF='dll' |
| 245 |
+ SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)' |
| 246 |
+ SHLIB_LIBS='$(TERMCAP_LIB)' |
| 247 |
|
| 248 |
SHLIB_DOT= |
| 249 |
- # For official cygwin releases, DLLVERSION will be defined in the |
| 250 |
- # environment of configure, and will be incremented any time the API |
| 251 |
- # changes in a non-backwards compatible manner. Otherwise, it is just |
| 252 |
- # SHLIB_MAJOR. |
| 253 |
- if [ -n "$DLLVERSION" ] ; then |
| 254 |
+ # For official cygwin releases, DLLVERSION will be defined in the |
| 255 |
+ # environment of configure, and will be incremented any time the API |
| 256 |
+ # changes in a non-backwards compatible manner. Otherwise, it is just |
| 257 |
+ # SHLIB_MAJOR. |
| 258 |
+ if [ -n "$DLLVERSION" ] ; then |
| 259 |
SHLIB_DLLVERSION="$DLLVERSION" |
| 260 |
- fi |
| 261 |
+ fi |
| 262 |
+ ;; |
| 263 |
+ |
| 264 |
+mingw*) |
| 265 |
+ SHOBJ_LD='$(CC)' |
| 266 |
+ SHOBJ_LDFLAGS='-shared -Wl,--enable-auto-import -Wl,--enable-auto-image-base -Wl,--export-all -Wl,--out-implib=$(@).a' |
| 267 |
+ SHLIB_LIBSUFF='dll' |
| 268 |
+ SHLIB_LIBVERSION='$(SHLIB_DLLVERSION).$(SHLIB_LIBSUFF)' |
| 269 |
+ SHLIB_LIBS='$(TERMCAP_LIB)' |
| 270 |
+ |
| 271 |
+ SHLIB_DOT= |
| 272 |
+ # For official cygwin releases, DLLVERSION will be defined in the |
| 273 |
+ # environment of configure, and will be incremented any time the API |
| 274 |
+ # changes in a non-backwards compatible manner. Otherwise, it is just |
| 275 |
+ # SHLIB_MAJOR. |
| 276 |
+ if [ -n "$DLLVERSION" ] ; then |
| 277 |
+ SHLIB_DLLVERSION="$DLLVERSION" |
| 278 |
+ fi |
| 279 |
;; |
| 280 |
|
| 281 |
# |