This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Use i386 sys/elf.h and sys/vm86.h for i386 and x86-64
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Thu, 31 May 2012 20:47:16 -0700
- Subject: PATCH: Use i386 sys/elf.h and sys/vm86.h for i386 and x86-64
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
This patch uses i386 sys/elf.h and sys/vm86.h for i386 and x86-64 so
that gcc -m32 behaves the same on i386 and x86-64. OK to install?
Thanks.
H.J.
---
* sysdeps/unix/sysv/linux/i386/Makefile (sysdep_headers):
Don't add sys/elf.h sys/perm.h sys/reg.h sys/vm86.h
sys/debugreg.h sys/io.h here.
* sysdeps/unix/sysv/linux/x86/Makefile (sysdep_headers): Add
sys/elf.h sys/perm.h sys/reg.h sys/vm86.h sys/debugreg.h
sys/io.h.
* sysdeps/unix/sysv/linux/x86_64/Makefile (sysdep_headers):
Don't add sys/perm.h sys/reg.h sys/debugreg.h sys/io.h here.
* sysdeps/unix/sysv/linux/i386/sys/elf.h: Renamed to ...
* sysdeps/unix/sysv/linux/x86/sys/elf.h: This.
* sysdeps/unix/sysv/linux/i386/sys/vm86.h: Renamed to ...
* sysdeps/unix/sysv/linux/x86/sys/vm86.h: This.
diff --git a/sysdeps/unix/sysv/linux/i386/Makefile b/sysdeps/unix/sysv/linux/i386/Makefile
index f4585d7..acc3021 100644
--- a/sysdeps/unix/sysv/linux/i386/Makefile
+++ b/sysdeps/unix/sysv/linux/i386/Makefile
@@ -3,7 +3,6 @@ default-abi := 32
ifeq ($(subdir),misc)
sysdep_routines += ioperm iopl vm86 call_pselect6 call_fallocate
-sysdep_headers += sys/elf.h sys/perm.h sys/reg.h sys/vm86.h sys/debugreg.h sys/io.h
endif
ifeq ($(subdir),elf)
diff --git a/sysdeps/unix/sysv/linux/x86/Makefile b/sysdeps/unix/sysv/linux/x86/Makefile
index cf4a55c..6412a9e 100644
--- a/sysdeps/unix/sysv/linux/x86/Makefile
+++ b/sysdeps/unix/sysv/linux/x86/Makefile
@@ -12,3 +12,7 @@ abi-64-ld-soname := ld-linux-x86-64.so.2
abi-x32-options := -U__i386__ -D__x86_64__ -D__ILP32__ -U__LP64__
abi-x32-condition := defined __x86_64__ && defined __ILP32__
abi-x32-ld-soname := ld-linux-x32.so.2
+
+ifeq ($(subdir),misc)
+sysdep_headers += sys/elf.h sys/perm.h sys/reg.h sys/vm86.h sys/debugreg.h sys/io.h
+endif
diff --git a/sysdeps/unix/sysv/linux/i386/sys/elf.h b/sysdeps/unix/sysv/linux/x86/sys/elf.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/i386/sys/elf.h
rename to sysdeps/unix/sysv/linux/x86/sys/elf.h
diff --git a/sysdeps/unix/sysv/linux/i386/sys/vm86.h b/sysdeps/unix/sysv/linux/x86/sys/vm86.h
similarity index 100%
rename from sysdeps/unix/sysv/linux/i386/sys/vm86.h
rename to sysdeps/unix/sysv/linux/x86/sys/vm86.h
diff --git a/sysdeps/unix/sysv/linux/x86_64/Makefile b/sysdeps/unix/sysv/linux/x86_64/Makefile
index dd4ab59..d6a9d36 100644
--- a/sysdeps/unix/sysv/linux/x86_64/Makefile
+++ b/sysdeps/unix/sysv/linux/x86_64/Makefile
@@ -1,6 +1,5 @@
ifeq ($(subdir),misc)
sysdep_routines += ioperm iopl
-sysdep_headers += sys/perm.h sys/reg.h sys/debugreg.h sys/io.h
endif
ifeq ($(subdir),stdlib)