summaryrefslogtreecommitdiff
path: root/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.2.0-x32.patch
diff options
context:
space:
mode:
Diffstat (limited to 'media-libs/libjpeg-turbo/files/libjpeg-turbo-1.2.0-x32.patch')
-rw-r--r--media-libs/libjpeg-turbo/files/libjpeg-turbo-1.2.0-x32.patch38
1 files changed, 38 insertions, 0 deletions
diff --git a/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.2.0-x32.patch b/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.2.0-x32.patch
new file mode 100644
index 000000000000..523eed7557d5
--- /dev/null
+++ b/media-libs/libjpeg-turbo/files/libjpeg-turbo-1.2.0-x32.patch
@@ -0,0 +1,38 @@
+https://bugs.gentoo.org/420239
+
+https://sourceforge.net/tracker/?func=detail&aid=3533795&group_id=303195&atid=1278160
+
+--- a/configure
++++ b/configure
+@@ -33,7 +33,11 @@ case "$host_os" in
+ linux*)
+ case "$host_cpu" in
+ x86_64)
+- objfmt='ELF64'
++ if echo __ILP32__ | $CC $CFLAGS -E - | grep __ILP32__ > /dev/null; then
++ objfmt='ELF64'
++ else
++ objfmt='ELFX32'
++ fi
+ ;;
+ *)
+ objfmt='ELF'
+@@ -94,6 +98,7 @@ case "$objfmt" in
+ a.out) NAFLAGS='-faout -DAOUT';;
+ BSD-a.out) NAFLAGS='-faoutb -DAOUT';;
+ ELF) NAFLAGS='-felf -DELF';;
++ ELFX32) NAFLAGS='-felfx32 -DELF -D__x86_64__';;
+ ELF64) NAFLAGS='-felf64 -DELF -D__x86_64__';;
+ RDF) NAFLAGS='-frdf -DRDF';;
+ Mach-O) NAFLAGS='-fmacho -DMACHO';;
+--- a/simd/nasm_lt.sh
++++ b/simd/nasm_lt.sh
+@@ -11,7 +11,7 @@ while [ $# -gt 0 ]; do
+ pic=yes
+ fi
+ ;;
+- -f|-fbin|-faout|-faoutb|-fcoff|-felf|-felf64|-fas86| \
++ -f|-fbin|-faout|-faoutb|-fcoff|-felf|-felf64|-felfx32|-fas86| \
+ -fobj|-fwin32|-fwin64|-frdf|-fieee|-fmacho|-fmacho64)
+ # it's a file format specifier for nasm.
+ command="$command $1"