This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH][s390x] Fix build of z9 iconv rountines on z900


The GNU libc provides iconv optimized routines using instructions
introduced on the z9-109. They check for hardware support before running
such instructions, so it is still possible to target a z900 CPU.

However recent versions of binutils now rejects these instructions when
targeting a z900 CPU. It's not possible to call GCC with -march=z9-109
as it would enable other instructions and the code won't run anymore on
a z900 CPU. Instead this patch force the z9-109 instruction set at the
assembler level.

2011-03-01  Aurelien Jarno  <aurelien@aurel32.net>

	* sysdeps/s390/s390-64/Makefile(utf8-utf32-z9.c): pass 
	-march=z9-109 to the assembler.
	(utf16-utf32-z9.c): Likewise.
	(utf8-utf16-z9.c): Likewise.

diff --git a/sysdeps/s390/s390-64/Makefile b/sysdeps/s390/s390-64/Makefile
index 1814f37..bb0b62c 100644
--- a/sysdeps/s390/s390-64/Makefile
+++ b/sysdeps/s390/s390-64/Makefile
@@ -16,12 +16,15 @@ ISO-8859-1_CP037_Z900-map := gconv.map
 
 UTF8_UTF32_Z9-routines := utf8-utf32-z9
 UTF8_UTF32_Z9-map := gconv.map
+CFLAGS-utf8-utf32-z9.c += -Wa,-march=z9-109
 
 UTF16_UTF32_Z9-routines := utf16-utf32-z9
 UTF16_UTF32_Z9-map := gconv.map
+CFLAGS-utf16-utf32-z9.c += -Wa,-march=z9-109
 
 UTF8_UTF16_Z9-routines := utf8-utf16-z9
 UTF8_UTF16_Z9-map := gconv.map
+CFLAGS-utf8-utf16-z9.c += -Wa,-march=z9-109
 
 s390x-iconv-modules = ISO-8859-1_CP037_Z900 UTF8_UTF16_Z9 UTF16_UTF32_Z9 UTF8_UTF32_Z9

-- 
Aurelien Jarno                          GPG: 1024D/F1BCDB73
aurelien@aurel32.net                 http://www.aurel32.net


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]