Bug 196004: added a test to determine whether gcc uses GNU ld or the native

ld.  This test is useful on Solaris.  Then, use this test to provide better
support for gcc on Solaris.  We can use the right linker flags depending on
the ld that gcc uses. r=cls.
This commit is contained in:
wtc%netscape.com 2003-03-25 00:50:23 +00:00
Родитель 3ef153fb1b
Коммит 0d5f62ecaf
1 изменённых файлов: 11 добавлений и 4 удалений

Просмотреть файл

@ -296,6 +296,11 @@ fi
if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then if test "`echo | $LD -v 2>&1 | grep -c GNU`" != "0"; then
GNU_LD=1 GNU_LD=1
fi fi
if test "$GNU_CC"; then
if `$CC -print-prog-name=ld` -v 2>&1 | grep -c GNU >/dev/null; then
GCC_USE_GNU_LD=1
fi
fi
dnl Special win32 checks dnl Special win32 checks
dnl ======================================================== dnl ========================================================
@ -1481,11 +1486,13 @@ case "$target" in
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script' MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
;; ;;
*-solaris*) *-solaris*)
if test -z "$GNU_LD"; then
if test -z "$GNU_CC"; then if test -z "$GNU_CC"; then
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-M $(BUILD_TOOLS)/gnu-ld-scripts/components-mapfile' MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-M $(BUILD_TOOLS)/gnu-ld-scripts/components-mapfile'
else else
if test -z "$GCC_USE_GNU_LD"; then
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,-M -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-mapfile' MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,-M -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-mapfile'
else
MOZ_COMPONENTS_VERSION_SCRIPT_LDFLAGS='-Wl,--version-script -Wl,$(BUILD_TOOLS)/gnu-ld-scripts/components-version-script'
fi fi
fi fi
;; ;;