This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix MidnightBSD hints file for 0.4-RELEASE
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Sun, 7 Jul 2013 12:55:29 +0000 (13:55 +0100)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Sun, 7 Jul 2013 12:55:29 +0000 (13:55 +0100)
0.4 has no /usr/bin/objformat, so the hints file was
falling through to configure for aout with fatal consequences.

Confirmed that the objformat in 0.3 warns that it is deprecated.

Have switched around the logic of the checks so that it will always
configure for elf, using aout is explicitly detected.

hints/midnightbsd.sh

index 13a5335..1c0ea2f 100644 (file)
@@ -6,17 +6,17 @@ esac
 libswanted=`echo $libswanted | sed 's/ malloc / /'`
 
 objformat=`/usr/bin/objformat`
-if [ x$objformat = xelf ]; then
-    libpth="/usr/lib /usr/local/lib"
-    glibpth="/usr/lib /usr/local/lib"
-    ldflags="-Wl,-E "
-    lddlflags="-shared "
-else
+if [ x$objformat = xaout ]; then
     if [ -e /usr/lib/aout ]; then
         libpth="/usr/lib/aout /usr/local/lib /usr/lib"
         glibpth="/usr/lib/aout /usr/local/lib /usr/lib"
     fi
     lddlflags='-Bshareable'
+else
+    libpth="/usr/lib /usr/local/lib"
+    glibpth="/usr/lib /usr/local/lib"
+    ldflags="-Wl,-E "
+    lddlflags="-shared "
 fi
 cccdlflags='-DPIC -fPIC'