aboutsummaryrefslogtreecommitdiff
path: root/system/efitools
diff options
context:
space:
mode:
authorDavid Spencer <baildon.research@googlemail.com>2015-12-29 21:42:10 +0000
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2016-01-17 09:40:16 +0700
commit6cd5febaf725a69772a57a48bb9d54c42c1cbf3a (patch)
treef3b068f56e34f9d8eddefeed3776e7555c025e82 /system/efitools
parente8b02597b1316eb0464e97b0d1864693a6ab122c (diff)
system/efitools: Fixed build with gcc-5.3.0.
Signed-off-by: David Spencer <baildon.research@googlemail.com> Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/efitools')
-rw-r--r--system/efitools/efitools.SlackBuild15
1 files changed, 14 insertions, 1 deletions
diff --git a/system/efitools/efitools.SlackBuild b/system/efitools/efitools.SlackBuild
index ced522780f31..771568ec1ed7 100644
--- a/system/efitools/efitools.SlackBuild
+++ b/system/efitools/efitools.SlackBuild
@@ -45,14 +45,21 @@ OUTPUT=${OUTPUT:-/tmp}
# It's not safe to specify build flags since some EFI programs are built.
if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
LIBDIRSUFFIX=""
EFI_ARCH=ia32
elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
LIBDIRSUFFIX=""
EFI_ARCH=ia32
elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
LIBDIRSUFFIX="64"
EFI_ARCH=x86_64
+else
+ SLKCFLAGS="-O2"
+ LIBDIRSUFFIX=""
+ EFI_ARCH="$ARCH"
fi
set -e
@@ -84,7 +91,13 @@ find -L . \
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
-make CRTPATH=/usr/lib${LIBDIRSUFFIX}/gnuefi MYGUID=${MYGUID} ARCH=$EFI_ARCH
+unset ARCH
+
+make \
+ CRTPATH=/usr/lib${LIBDIRSUFFIX}/gnuefi \
+ MYGUID=${MYGUID} \
+ ARCH=$EFI_ARCH \
+ CFLAGS="-std=gnu89 $SLKCFLAGS"
make install DESTDIR=$PKG MANDIR=$PKG/usr/man/man1 ARCH=$EFI_ARCH
# Delete the private keys in $TMP. Especially important if the user doesn't