public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
* Update MIPS for syscall-list changes
@ 2012-05-30 16:03 Joseph S. Myers
  2012-05-30 17:44 ` Chris Metcalf
  0 siblings, 1 reply; 4+ messages in thread
From: Joseph S. Myers @ 2012-05-30 16:03 UTC (permalink / raw)
  To: libc-ports; +Cc: Chris Metcalf

I've applied this patch to update the MIPS port for the syscall-list 
changes in libc, so that triarch headers are still generated correctly 
after those changes.

I think tilegx should properly be updated to have the right definitions as 
a biarch port - even if there are no differences for lib-names.h or 
syscall.h between the 32-bit and 64-bit cases, each should still get its 
own stubs.h generated.

diff --git a/ChangeLog.mips b/ChangeLog.mips
index d058589..7d07aa6 100644
--- a/ChangeLog.mips
+++ b/ChangeLog.mips
@@ -1,5 +1,18 @@
 2012-05-30  Joseph Myers  <joseph@codesourcery.com>
 
+	* sysdeps/unix/sysv/linux/mips/Makefile (syscall-list-variants):
+	Rename to abi-variants.
+	(syscall-list-includes): Rename to abi-includes.
+	(syscall-list-o32-options): Rename to abi-o32-options.
+	(syscall-list-o32-condition): Rename to abi-o32-condition.
+	(syscall-list-n32-options): Rename to abi-n32-options.
+	(syscall-list-n32-condition): Rename to abi-n32-condition.
+	(syscall-list-n64-options): Rename to abi-n64-options.
+	(syscall-list-n64-condition): Rename to abi-n64-condition.
+	* sysdeps/unix/sysv/linux/mips/mips32/Makefile: New file.
+	* sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile: Likewise.
+	* sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile: Likewise.
+
 	* sysdeps/unix/sysv/linux/mips/nptl/pthread_once.c: Replace
 	_internal alias by hidden_def.
 
diff --git a/sysdeps/unix/sysv/linux/mips/Makefile b/sysdeps/unix/sysv/linux/mips/Makefile
index 2aaf63c..fd6e3e0 100644
--- a/sysdeps/unix/sysv/linux/mips/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/Makefile
@@ -8,14 +8,14 @@ sysdep_routines += cachectl cacheflush sysmips _test_and_set
 sysdep_headers += sys/cachectl.h sys/sysmips.h sys/tas.h
 
 # _MIPS_SIM_ABI32 == 1, _MIPS_SIM_ABIN32 == 2, _MIPS_SIM_ABI64 == 3
-syscall-list-variants := o32 n32 n64
-syscall-list-includes := sgidefs.h
-syscall-list-o32-options := -D_MIPS_SIM=1
-syscall-list-o32-condition := _MIPS_SIM == _MIPS_SIM_ABI32
-syscall-list-n32-options := -D_MIPS_SIM=2
-syscall-list-n32-condition := _MIPS_SIM == _MIPS_SIM_ABIN32
-syscall-list-n64-options := -D_MIPS_SIM=3
-syscall-list-n64-condition := _MIPS_SIM == _MIPS_SIM_ABI64
+abi-variants := o32 n32 n64
+abi-includes := sgidefs.h
+abi-o32-options := -D_MIPS_SIM=1
+abi-o32-condition := _MIPS_SIM == _MIPS_SIM_ABI32
+abi-n32-options := -D_MIPS_SIM=2
+abi-n32-condition := _MIPS_SIM == _MIPS_SIM_ABIN32
+abi-n64-options := -D_MIPS_SIM=3
+abi-n64-condition := _MIPS_SIM == _MIPS_SIM_ABI64
 endif
 
 ifeq ($(subdir),elf)
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/Makefile b/sysdeps/unix/sysv/linux/mips/mips32/Makefile
new file mode 100644
index 0000000..77e9121
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips32/Makefile
@@ -0,0 +1 @@
+default-abi := o32
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile b/sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile
new file mode 100644
index 0000000..2368c40
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/Makefile
@@ -0,0 +1 @@
+default-abi := n32
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile b/sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile
new file mode 100644
index 0000000..fed17ba
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n64/Makefile
@@ -0,0 +1 @@
+default-abi := n64

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Update MIPS for syscall-list changes
  2012-05-30 16:03 Update MIPS for syscall-list changes Joseph S. Myers
@ 2012-05-30 17:44 ` Chris Metcalf
  2012-05-30 18:46   ` Joseph S. Myers
  0 siblings, 1 reply; 4+ messages in thread
From: Chris Metcalf @ 2012-05-30 17:44 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: libc-ports

On 5/30/2012 12:02 PM, Joseph S. Myers wrote:
> I think tilegx should properly be updated to have the right definitions as 
> a biarch port - even if there are no differences for lib-names.h or 
> syscall.h between the 32-bit and 64-bit cases, each should still get its 
> own stubs.h generated.

In fact, syscall.h was problematic, since by default we were only getting
the -m64 names, not the -m32 names.  I added a
sysdeps/unix/sysv/linux/tile/tilegx/Makefile that has:

+ifeq ($(subdir),misc)
+
+# Provide biarch definitions.
+abi-variants := 64 32
+abi-64-options := -D__LP64__
+abi-64-condition := __WORDSIZE == 64
+abi-32-options := -U__LP64__
+abi-32-condition := __WORDSIZE == 32
+
+endif

I pushed this, along with some other changes to catch up with recent work:

commit a88035b5fb970d4b47e22e6978704f94c7b46271
Author: Chris Metcalf <cmetcalf@tilera.com>
Date:   Wed May 30 13:14:50 2012 -0400

    tile: update libm-test-ulps

commit c64bb3c94786f41f0c5efff4cbe55a65357afffc
Author: Chris Metcalf <cmetcalf@tilera.com>
Date:   Wed May 30 13:14:28 2012 -0400

    tile: support biarch tilegx with a new tilegx Makefile

commit a7ccf2071734f6cd01c228b04947647faf43d3f6
Author: Chris Metcalf <cmetcalf@tilera.com>
Date:   Wed May 30 12:22:59 2012 -0400

    tile: Use hidden_def for pthread_once

commit 3b3b9920c96cc004b132658546bdb84761415777
Author: Chris Metcalf <cmetcalf@tilera.com>
Date:   Wed May 30 12:19:21 2012 -0400

    tile: remove __ASSUME_NEW_GETRLIMIT_SYSCALL, __ASSUME_TRUNCATE64_SYSCALL

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Update MIPS for syscall-list changes
  2012-05-30 17:44 ` Chris Metcalf
@ 2012-05-30 18:46   ` Joseph S. Myers
  2012-05-30 19:54     ` Chris Metcalf
  0 siblings, 1 reply; 4+ messages in thread
From: Joseph S. Myers @ 2012-05-30 18:46 UTC (permalink / raw)
  To: Chris Metcalf; +Cc: libc-ports

On Wed, 30 May 2012, Chris Metcalf wrote:

> In fact, syscall.h was problematic, since by default we were only getting
> the -m64 names, not the -m32 names.  I added a
> sysdeps/unix/sysv/linux/tile/tilegx/Makefile that has:
> 
> +ifeq ($(subdir),misc)
> +
> +# Provide biarch definitions.
> +abi-variants := 64 32
> +abi-64-options := -D__LP64__
> +abi-64-condition := __WORDSIZE == 64
> +abi-32-options := -U__LP64__
> +abi-32-condition := __WORDSIZE == 32
> +
> +endif

For stubs.h to work correctly you should also have default-abi definitions 
in appropriate files for each ABI.

-- 
Joseph S. Myers
joseph@codesourcery.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Update MIPS for syscall-list changes
  2012-05-30 18:46   ` Joseph S. Myers
@ 2012-05-30 19:54     ` Chris Metcalf
  0 siblings, 0 replies; 4+ messages in thread
From: Chris Metcalf @ 2012-05-30 19:54 UTC (permalink / raw)
  To: Joseph S. Myers; +Cc: libc-ports

On 5/30/2012 2:46 PM, Joseph S. Myers wrote:
> On Wed, 30 May 2012, Chris Metcalf wrote:
>
>> In fact, syscall.h was problematic, since by default we were only getting
>> the -m64 names, not the -m32 names.  I added a
>> sysdeps/unix/sysv/linux/tile/tilegx/Makefile that has:
>>
>> +ifeq ($(subdir),misc)
>> +
>> +# Provide biarch definitions.
>> +abi-variants := 64 32
>> +abi-64-options := -D__LP64__
>> +abi-64-condition := __WORDSIZE == 64
>> +abi-32-options := -U__LP64__
>> +abi-32-condition := __WORDSIZE == 32
>> +
>> +endif
> For stubs.h to work correctly you should also have default-abi definitions 
> in appropriate files for each ABI.

Thanks, I pushed appropriate Makefile changes.

-- 
Chris Metcalf, Tilera Corp.
http://www.tilera.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-05-30 19:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-30 16:03 Update MIPS for syscall-list changes Joseph S. Myers
2012-05-30 17:44 ` Chris Metcalf
2012-05-30 18:46   ` Joseph S. Myers
2012-05-30 19:54     ` Chris Metcalf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).