This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, hjl/mx32, created. glibc-2.16-ports-merge-17-g4c43d95
- From: hjl at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 6 Jul 2012 13:57:35 -0000
- Subject: GNU C Library master sources branch, hjl/mx32, created. glibc-2.16-ports-merge-17-g4c43d95
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, hjl/mx32 has been created
at 4c43d953820a1e0562416d6f3a313571ecd59eda (commit)
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4c43d953820a1e0562416d6f3a313571ecd59eda
commit 4c43d953820a1e0562416d6f3a313571ecd59eda
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Jul 6 06:56:12 2012 -0700
Rename tile bits/environments.h to bits/environments.in
diff --git a/ports/ChangeLog.pr14200 b/ports/ChangeLog.pr14200
new file mode 100644
index 0000000..dcbfaf1
--- /dev/null
+++ b/ports/ChangeLog.pr14200
@@ -0,0 +1,5 @@
+2012-07-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14200]
+ * sysdeps/unix/sysv/linux/tile/bits/environments.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/tile/bits/environments.in: This.
diff --git a/ports/sysdeps/unix/sysv/linux/tile/bits/environments.h b/ports/sysdeps/unix/sysv/linux/tile/bits/environments.in
similarity index 100%
rename from ports/sysdeps/unix/sysv/linux/tile/bits/environments.h
rename to ports/sysdeps/unix/sysv/linux/tile/bits/environments.in
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=33e33775f394ce09eca4dc16ae4960f5fc39fec5
commit 33e33775f394ce09eca4dc16ae4960f5fc39fec5
Author: H.J. Lu <hjl.tools@gmail.com>
Date: Fri Jul 6 06:49:45 2012 -0700
Add --with-ilp32-large-off_t
On x86-64, ILP32 with large off_t (64-bit) can be either -mx32 or -m32
with "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64". This patch adds
a configure time option to choose which one to use for ILP32_OFFBIG.
diff --git a/ChangeLog.pr14200 b/ChangeLog.pr14200
new file mode 100644
index 0000000..02f7217
--- /dev/null
+++ b/ChangeLog.pr14200
@@ -0,0 +1,37 @@
+2012-07-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ [BZ #14200]
+ * Makerules (before-compile): Add $(common-objpfx)bits/environments.h.
+ (%.in): Add vpath on $(sysdirs).
+ ($(common-objpfx)bits/environments.h): New rule.
+ ($(common-objpfx)bits/environments.st): Likewise.
+ (common-generated): Add bits/environments.h bits/environments.st.
+ * config.make.in (environments_in): New macro.
+ * configure.in: Add --with-ilp32-large-off_t. Set environments_in
+ to bits/environments.in if not set.
+ * configure: Regenerated.
+ * bits/environments.h: Renamed to ...
+ * bits/environments.in: This.
+ * sysdeps/unix/bsd/bsd4.4/freebsd/bits/environments.h: Renamed
+ to ...
+ * sysdeps/unix/bsd/bsd4.4/freebsd/bits/environments.in: This.
+ * sysdeps/unix/sysv/linux/powerpc/bits/environments.h: Renamed
+ to ...
+ * sysdeps/unix/sysv/linux/powerpc/bits/environments.in: This.
+ * sysdeps/unix/sysv/linux/s390/bits/environments.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/s390/bits/environments.in: This.
+ * sysdeps/unix/sysv/linux/sparc/bits/environments.h: Renamed to ...
+ * sysdeps/unix/sysv/linux/sparc/bits/environments.in: This.
+ * sysdeps/unix/sysv/linux/x86/bits/environments.h: Renamed to
+ ...
+ * sysdeps/unix/sysv/linux/x86/bits/environments-m32.in: This.
+ (_POSIX_V7_ILP32_OFF32): Defined as 1 only if __x86_64__ isn't
+ defined.
+ (_POSIX_V6_ILP32_OFF32): Likewise.
+ (_XBS5_ILP32_OFF32): Likewise.
+ * sysdeps/unix/sysv/linux/i386/configure: New file.
+ * sysdeps/unix/sysv/linux/x86/bits/environments-mx32.in: Likewise.
+ * sysdeps/unix/sysv/linux/x86/configure: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/configure: Likewise.
+ * sysdeps/unix/sysv/linux/x86_64/x32/configure: Default to mx32
+ for ilp32_large_off_t.
diff --git a/Makerules b/Makerules
index 685b1b8..6abbf93 100644
--- a/Makerules
+++ b/Makerules
@@ -1254,6 +1254,17 @@ ifndef no_deps
-include $(stdio_lim:h=d)
endif
common-generated += bits/stdio_lim.h bits/stdio_lim.d bits/stdio_lim.st
+
+before-compile += $(common-objpfx)bits/environments.h
+vpath %.in $(sysdirs)
+$(common-objpfx)bits/environments.h: $(common-objpfx)bits/environments.st; @:
+$(common-objpfx)bits/environments.st: $(environments_in)
+ $(make-target-directory)
+ $(INSTALL_DATA) $< ${@:st=T}
+ $(move-if-change) ${@:st=T} ${@:st=h}
+ touch $@
+
+common-generated += bits/environments.h bits/environments.st
FORCE:
diff --git a/bits/environments.h b/bits/environments.in
similarity index 100%
rename from bits/environments.h
rename to bits/environments.in
diff --git a/config.make.in b/config.make.in
index 65410ab..8c18512 100644
--- a/config.make.in
+++ b/config.make.in
@@ -78,6 +78,8 @@ oldest-abi = @oldest_abi@
exceptions = @exceptions@
multi-arch = @multi_arch@
+environments_in = @environments_in@
+
mach-interface-list = @mach_interface_list@
have-bash2 = @libc_cv_have_bash2@
diff --git a/configure b/configure
index aa7869f..9792377 100755
--- a/configure
+++ b/configure
@@ -598,6 +598,7 @@ libc_cv_localedir
libc_cv_slibdir
old_glibc_headers
libc_cv_gcc_unwind_find_fde
+environments_in
libc_extra_cflags
CPPUNDEFS
sizeof_long_double
@@ -750,6 +751,7 @@ enable_nss_crypt
enable_obsolete_rpc
enable_systemtap
with_cpu
+with_ilp32_large_off_t
'
ac_precious_vars='build_alias
host_alias
@@ -1421,6 +1423,8 @@ Optional Packages:
/usr/src/linux/include) [default=compiler default]
--with-default-link do not use explicit linker scripts
--with-cpu=CPU select code for CPU variant
+ --with-ilp32-large-off_t=option
+ select ILP32 option for large off_t
Some influential environment variables:
CC C compiler command
@@ -3810,6 +3814,19 @@ if test "${with_cpu+set}" = set; then :
fi
+ilp32_large_off_t=
+
+# Check whether --with-ilp32-large-off_t was given.
+if test "${with_ilp32_large_off_t+set}" = set; then :
+ withval=$with_ilp32_large_off_t; case "$withval" in
+ yes|'') as_fn_error $? "--with-ilp32-large-off_t requires an argument" "$LINENO" 5 ;;
+ no) ;;
+ *) ilp32_large_off_t="$withval" ;;
+ esac
+
+fi
+
+
if frags=`ls -d $srcdir/sysdeps/*/preconfigure 2> /dev/null`
then
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysdeps preconfigure fragments" >&5
@@ -7467,6 +7484,17 @@ $as_echo "running configure fragment for $dir" >&6; }
fi
done
+# Check ilp32_large_off_t after all configure fragments have been
+# processed.
+if test -n "$ilp32_large_off_t"; then
+ if test -z "$ilp32_large_off_t_used"; then
+ as_fn_error $? "The $ilp32_large_off_t ILP32 large off_t option of $host_cpu is not supported." "$LINENO" 5
+ fi
+else
+ environments_in=bits/environments.in
+fi
+
+
if test x$libc_cv_gcc_unwind_find_fde = xyes; then
$as_echo "#define EXPORT_UNWIND_FIND_FDE 1" >>confdefs.h
diff --git a/configure.in b/configure.in
index 5028e64..646fea0 100644
--- a/configure.in
+++ b/configure.in
@@ -349,6 +349,18 @@ AC_ARG_WITH([cpu],
esac
])
+ilp32_large_off_t=
+AC_ARG_WITH([ilp32-large-off_t],
+ AS_HELP_STRING([--with-ilp32-large-off_t=option],
+ [select ILP32 option for large off_t]),
+ [dnl
+ case "$withval" in
+ yes|'') AC_MSG_ERROR([--with-ilp32-large-off_t requires an argument]) ;;
+ no) ;;
+ *) ilp32_large_off_t="$withval" ;;
+ esac
+])
+
dnl Let sysdeps/*/preconfigure act here, like they can in add-ons.
LIBC_PRECONFIGURE([$srcdir], [for sysdeps])
@@ -2136,6 +2148,17 @@ for dir in $sysnames; do
fi
done
+# Check ilp32_large_off_t after all configure fragments have been
+# processed.
+if test -n "$ilp32_large_off_t"; then
+ if test -z "$ilp32_large_off_t_used"; then
+ AC_MSG_ERROR(The $ilp32_large_off_t ILP32 large off_t option of $host_cpu is not supported.)
+ fi
+else
+ environments_in=bits/environments.in
+fi
+AC_SUBST(environments_in)
+
if test x$libc_cv_gcc_unwind_find_fde = xyes; then
AC_DEFINE(EXPORT_UNWIND_FIND_FDE)
fi
diff --git a/sysdeps/unix/bsd/bsd4.4/freebsd/bits/environments.h b/sysdeps/unix/bsd/bsd4.4/freebsd/bits/environments.in
similarity index 100%
rename from sysdeps/unix/bsd/bsd4.4/freebsd/bits/environments.h
rename to sysdeps/unix/bsd/bsd4.4/freebsd/bits/environments.in
diff --git a/sysdeps/unix/sysv/linux/i386/configure b/sysdeps/unix/sysv/linux/i386/configure
new file mode 100644
index 0000000..ea396d5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/i386/configure
@@ -0,0 +1,3 @@
+# Local configure fragment for sysdeps/unix/sysv/linux/x86_64
+
+. $srcdir/sysdeps/unix/sysv/linux/x86/configure
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/environments.h b/sysdeps/unix/sysv/linux/powerpc/bits/environments.in
similarity index 100%
rename from sysdeps/unix/sysv/linux/powerpc/bits/environments.h
rename to sysdeps/unix/sysv/linux/powerpc/bits/environments.in
diff --git a/sysdeps/unix/sysv/linux/s390/bits/environments.h b/sysdeps/unix/sysv/linux/s390/bits/environments.in
similarity index 100%
rename from sysdeps/unix/sysv/linux/s390/bits/environments.h
rename to sysdeps/unix/sysv/linux/s390/bits/environments.in
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/environments.h b/sysdeps/unix/sysv/linux/sparc/bits/environments.in
similarity index 100%
copy from sysdeps/unix/sysv/linux/sparc/bits/environments.h
copy to sysdeps/unix/sysv/linux/sparc/bits/environments.in
diff --git a/sysdeps/unix/sysv/linux/x86/bits/environments.h b/sysdeps/unix/sysv/linux/x86/bits/environments-m32.in
similarity index 89%
rename from sysdeps/unix/sysv/linux/x86/bits/environments.h
rename to sysdeps/unix/sysv/linux/x86/bits/environments-m32.in
index 793a04f..4eb3f17 100644
--- a/sysdeps/unix/sysv/linux/x86/bits/environments.h
+++ b/sysdeps/unix/sysv/linux/x86/bits/environments-m32.in
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2001, 2004, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -64,15 +64,19 @@
#else /* __WORDSIZE == 32 */
-/* By default we have 32-bit wide `int', `long int', pointers and `off_t'
- and all platforms support LFS. */
-# define _POSIX_V7_ILP32_OFF32 1
+/* We have 32-bit wide `int', `long int' and pointers and all platforms
+ support LFS. -mx32 has 64-bit wide `off_t'. */
# define _POSIX_V7_ILP32_OFFBIG 1
-# define _POSIX_V6_ILP32_OFF32 1
-# define _POSIX_V6_ILP32_OFFBIG 1
-# define _XBS5_ILP32_OFF32 1
+# define _POSIX_V6_ILP32_OFFBIG 1
# define _XBS5_ILP32_OFFBIG 1
+# ifndef __x86_64__
+/* -m32 has 32-bit wide `off_t'. */
+# define _POSIX_V7_ILP32_OFF32 1
+# define _POSIX_V6_ILP32_OFF32 1
+# define _XBS5_ILP32_OFF32 1
+# endif
+
/* We optionally provide an environment with the above size but an 64-bit
side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */
@@ -89,8 +93,8 @@
#endif /* __WORDSIZE == 32 */
#define __ILP32_OFF32_CFLAGS "-m32"
-#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
#define __ILP32_OFF32_LDFLAGS "-m32"
+#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
#define __ILP32_OFFBIG_LDFLAGS "-m32"
#define __LP64_OFF64_CFLAGS "-m64"
#define __LP64_OFF64_LDFLAGS "-m64"
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/environments.h b/sysdeps/unix/sysv/linux/x86/bits/environments-mx32.in
similarity index 87%
rename from sysdeps/unix/sysv/linux/sparc/bits/environments.h
rename to sysdeps/unix/sysv/linux/x86/bits/environments-mx32.in
index 793a04f..7179b64 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/environments.h
+++ b/sysdeps/unix/sysv/linux/x86/bits/environments-mx32.in
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2001, 2004, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -64,15 +64,19 @@
#else /* __WORDSIZE == 32 */
-/* By default we have 32-bit wide `int', `long int', pointers and `off_t'
- and all platforms support LFS. */
-# define _POSIX_V7_ILP32_OFF32 1
+/* We have 32-bit wide `int', `long int' and pointers and all platforms
+ support LFS. -mx32 has 64-bit wide `off_t'. */
# define _POSIX_V7_ILP32_OFFBIG 1
-# define _POSIX_V6_ILP32_OFF32 1
-# define _POSIX_V6_ILP32_OFFBIG 1
-# define _XBS5_ILP32_OFF32 1
+# define _POSIX_V6_ILP32_OFFBIG 1
# define _XBS5_ILP32_OFFBIG 1
+# ifndef __x86_64__
+/* -m32 has 32-bit wide `off_t'. */
+# define _POSIX_V7_ILP32_OFF32 1
+# define _POSIX_V6_ILP32_OFF32 1
+# define _XBS5_ILP32_OFF32 1
+# endif
+
/* We optionally provide an environment with the above size but an 64-bit
side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */
@@ -89,8 +93,8 @@
#endif /* __WORDSIZE == 32 */
#define __ILP32_OFF32_CFLAGS "-m32"
-#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64"
#define __ILP32_OFF32_LDFLAGS "-m32"
-#define __ILP32_OFFBIG_LDFLAGS "-m32"
+#define __ILP32_OFFBIG_CFLAGS "-mx32"
+#define __ILP32_OFFBIG_LDFLAGS "-mx32"
#define __LP64_OFF64_CFLAGS "-m64"
#define __LP64_OFF64_LDFLAGS "-m64"
diff --git a/sysdeps/unix/sysv/linux/x86/configure b/sysdeps/unix/sysv/linux/x86/configure
new file mode 100644
index 0000000..664656b
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86/configure
@@ -0,0 +1,13 @@
+# Local configure fragment for sysdeps/unix/sysv/x86_64.
+
+case x"$ilp32_large_off_t" in
+xm32|x)
+ environments_in=bits/environments-m32.in
+ ilp32_large_off_t=m32
+ ilp32_large_off_t_used=yes
+ ;;
+xmx32)
+ environments_in=bits/environments-mx32.in
+ ilp32_large_off_t_used=yes
+ ;;
+esac
diff --git a/sysdeps/unix/sysv/linux/x86_64/configure b/sysdeps/unix/sysv/linux/x86_64/configure
new file mode 100644
index 0000000..ea396d5
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/x86_64/configure
@@ -0,0 +1,3 @@
+# Local configure fragment for sysdeps/unix/sysv/linux/x86_64
+
+. $srcdir/sysdeps/unix/sysv/linux/x86/configure
diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/configure b/sysdeps/unix/sysv/linux/x86_64/x32/configure
index 51fc1e6..641a563 100644
--- a/sysdeps/unix/sysv/linux/x86_64/x32/configure
+++ b/sysdeps/unix/sysv/linux/x86_64/x32/configure
@@ -1,4 +1,4 @@
-# Local configure fragment for sysdeps/unix/sysv/linux/86_64/x32.
+# Local configure fragment for sysdeps/unix/sysv/linux/x86_64/x32.
case "$machine" in
x86_64/x32)
@@ -16,3 +16,15 @@ x86_64/x32)
esac
;;
esac
+
+case x"$ilp32_large_off_t" in
+xm32)
+ echo The -m32 ILP32 large off_t option of x32 is not supported.
+ exit 1
+ ;;
+xmx32|x)
+ environments_in=bits/environments-mx32.in
+ ilp32_large_off_t=mx32
+ ilp32_large_off_t_used=yes
+ ;;
+esac
-----------------------------------------------------------------------
hooks/post-receive
--
GNU C Library master sources