summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNed Ludd <solar@gentoo.org>2003-07-12 17:43:43 +0000
committerNed Ludd <solar@gentoo.org>2003-07-12 17:43:43 +0000
commit1b26a4f62e3e621b241f8191cd06b101fe080268 (patch)
tree225226b0ec213a281aa45c5be4d1ce3ebed62f87
parentAdded defines for fPIC code to avoid the use the of old __NR* inline assembly... (diff)
downloadhistorical-1b26a4f62e3e621b241f8191cd06b101fe080268.tar.gz
historical-1b26a4f62e3e621b241f8191cd06b101fe080268.tar.bz2
historical-1b26a4f62e3e621b241f8191cd06b101fe080268.zip
Added defines for fPIC code to avoid the use the of old __NR* inline assembly construction of syscalls
-rw-r--r--sys-apps/util-linux/Manifest4
-rw-r--r--sys-apps/util-linux/files/util-linux-2.11z-pic.patch76
2 files changed, 78 insertions, 2 deletions
diff --git a/sys-apps/util-linux/Manifest b/sys-apps/util-linux/Manifest
index 0560494f9275..dd187d8e7496 100644
--- a/sys-apps/util-linux/Manifest
+++ b/sys-apps/util-linux/Manifest
@@ -1,6 +1,6 @@
-MD5 3e53010365b59dade267ca354fbe2ffd ChangeLog 6958
+MD5 9043aa41895acd976b45ebfd9948d3bc ChangeLog 7199
MD5 fdc6f7ebf1e7f279d96f19c330868aa2 util-linux-2.11y.ebuild 2109
-MD5 0cd926897e8b3294ec46d9b721f9386d util-linux-2.11z-r5.ebuild 2706
+MD5 c8193ffb13cb982c0873b778b8d38415 util-linux-2.11z-r5.ebuild 2814
MD5 b73abbe53ce7a49cad81cc855b7d5924 util-linux-2.11z-r4.ebuild 2410
MD5 48e36b9b6ea3bed4ea25292f9ae5a958 files/digest-util-linux-2.11y 152
MD5 02afa4d774f45ab0b9ef42ecc1748005 files/digest-util-linux-2.11z-r4 153
diff --git a/sys-apps/util-linux/files/util-linux-2.11z-pic.patch b/sys-apps/util-linux/files/util-linux-2.11z-pic.patch
new file mode 100644
index 000000000000..53c5089d8aa1
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.11z-pic.patch
@@ -0,0 +1,76 @@
+diff -u -r -N util-linux-2.11z.orig/fdisk/llseek.c util-linux-2.11z/fdisk/llseek.c
+--- util-linux-2.11z.orig/fdisk/llseek.c 2002-10-31 14:44:31.000000000 +0100
++++ util-linux-2.11z/fdisk/llseek.c 2003-07-12 19:08:59.000000000 +0200
+@@ -3,6 +3,9 @@
+ *
+ * Copyright (C) 1994 Remy Card. This file may be redistributed
+ * under the terms of the GNU Public License.
++ *
++ * Changes:
++ * 20030712 - Alexander Gabert <pappy@nikita.ath.cx> - adding PIC defines
+ */
+
+ #include <sys/types.h>
+@@ -25,7 +28,8 @@
+
+ #else /* HAVE_LLSEEK */
+
+-#if defined(__alpha__) || defined(__ia64__) || defined(__s390x__)
++/* do not use assembler to put together syscalls at compile time (for llseek for example) when using PIC */
++#if defined(__PIC__) || defined(__pic__) || defined(__alpha__) || defined(__ia64__) || defined(__s390x__)
+
+ #define my_llseek lseek
+
+diff -u -r -N util-linux-2.11z.orig/fdisk/sfdisk.c util-linux-2.11z/fdisk/sfdisk.c
+--- util-linux-2.11z.orig/fdisk/sfdisk.c 2003-01-28 19:18:03.000000000 +0100
++++ util-linux-2.11z/fdisk/sfdisk.c 2003-07-12 19:08:38.000000000 +0200
+@@ -28,6 +28,7 @@
+ *
+ * Changes:
+ * 19990319 - Arnaldo Carvalho de Melo <acme@conectiva.com.br> - i18n
++ * 20030712 - Alexander Gabert <pappy@nikita.ath.cx> - adding PIC defines
+ */
+
+ #define PROGNAME "sfdisk"
+@@ -130,7 +131,9 @@
+ *
+ * Note: we use 512-byte sectors here, irrespective of the hardware ss.
+ */
+-#if !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__)
++
++/* do not use the assembler constructed syscalls for seeking if compiled as PIC */
++#if !defined(__PIC__) && !defined(__pic__) && !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__)
+ static
+ _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo,
+ loff_t *, res, uint, wh);
+@@ -142,7 +145,7 @@
+ in = ((loff_t) s << 9);
+ out = 1;
+
+-#if !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__)
++#if !defined(__PIC__) && !defined(__pic__) && !defined (__alpha__) && !defined (__ia64__) && !defined (__x86_64__) && !defined (__s390x__)
+ if (_llseek (fd, in>>32, in & 0xffffffff, &out, SEEK_SET) != 0) {
+ #else
+ if ((out = lseek(fd, in, SEEK_SET)) != in) {
+diff -u -r -N util-linux-2.11z.orig/mount/pivot_root.c util-linux-2.11z/mount/pivot_root.c
+--- util-linux-2.11z.orig/mount/pivot_root.c 2002-11-29 12:02:56.000000000 +0100
++++ util-linux-2.11z/mount/pivot_root.c 2003-07-12 19:07:39.000000000 +0200
+@@ -1,12 +1,17 @@
+ /* pivot_root.c - Change the root file system */
+
+ /* Written 2000 by Werner Almesberger */
++/*
++ * Jul 11 2003 <solar@gentoo.org>
++ * avoid using assembler constructed _syscall2() when PIC is needed
++ */
+
+ #include <stdio.h>
+ #include <errno.h> /* needed for <linux/unistd.h> below */
+
+-#ifdef __ia64__
++#if (defined(__ia64__) || defined(__PIC__) || defined(__pic__))
+ # include <sys/syscall.h>
++# include <unistd.h>
+ # define pivot_root(new_root,put_old) syscall(SYS_pivot_root,new_root,put_old)
+ #else
+ # include <linux/unistd.h>