Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 126501 - dev-libs/gmp-4.1.4 noexecstack patch don't support arm assembly
Summary: dev-libs/gmp-4.1.4 noexecstack patch don't support arm assembly
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: ARM Linux
: High normal (vote)
Assignee: Gentoo ARM Porters
URL:
Whiteboard:
Keywords:
: 126505 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-03-17 01:42 UTC by Stanislaw Gruszka
Modified: 2015-04-08 07:01 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stanislaw Gruszka 2006-03-17 01:42:03 UTC
Portage 2.0.53 (uclibc/arm/2.4, gcc-3.4.5, uclibc-0.9.28-r0, 2.6.15.4-iop1 armv)
=================================================================
System uname: 2.6.15.4-iop1 armv5tel XScale-IOP8032x Family rev 0 (v5l)
Gentoo Base System version 1.6.14
distcc 2.18.3 arm-softfloat-linux-uclibc (protocols 1 and 2) (default port 3632]
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="arm"
AUTOCLEAN="yes"
CBUILD="arm-softfloat-linux-uclibc"
CFLAGS="-O2 -pipe -march=armv5t -mtune=xscale -fomit-frame-pointer -msoft-float"
CHOST="arm-softfloat-linux-uclibc"

Arm assembly use % for elf section types (@ is for begin comment) so compilation
fail with:

m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_udiv -DPIC udiv.asm >tmp-udiv.s
 gcc -c -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_udiv -O2 -pipe -march=armv5t -mtune=o
tmp-udiv.s: Assembler messages:
tmp-udiv.s:39: Error: junk at end of line, first unrecognized character is `,'
make[2]: *** [udiv.lo] Error 1
make[2]: *** Waiting for unfinished jobs.. 

I have modify noexecstack patches and seems things works.

localhost files # cat gmp-4.1.4-noexecstack.patch
fixed executable stack as per bug #115038 thanks to Petteri R
Comment 1 Stanislaw Gruszka 2006-03-17 01:42:03 UTC
Portage 2.0.53 (uclibc/arm/2.4, gcc-3.4.5, uclibc-0.9.28-r0, 2.6.15.4-iop1 armv)
=================================================================
System uname: 2.6.15.4-iop1 armv5tel XScale-IOP8032x Family rev 0 (v5l)
Gentoo Base System version 1.6.14
distcc 2.18.3 arm-softfloat-linux-uclibc (protocols 1 and 2) (default port 3632]
ccache version 2.3 [enabled]
ACCEPT_KEYWORDS="arm"
AUTOCLEAN="yes"
CBUILD="arm-softfloat-linux-uclibc"
CFLAGS="-O2 -pipe -march=armv5t -mtune=xscale -fomit-frame-pointer -msoft-float"
CHOST="arm-softfloat-linux-uclibc"

Arm assembly use % for elf section types (@ is for begin comment) so compilation
fail with:

m4  -DHAVE_CONFIG_H -D__GMP_WITHIN_GMP -DOPERATION_udiv -DPIC udiv.asm >tmp-udiv.s
 gcc -c -DHAVE_CONFIG_H -I. -I. -I.. -D__GMP_WITHIN_GMP -I.. -DOPERATION_udiv -O2 -pipe -march=armv5t -mtune=o
tmp-udiv.s: Assembler messages:
tmp-udiv.s:39: Error: junk at end of line, first unrecognized character is `,'
make[2]: *** [udiv.lo] Error 1
make[2]: *** Waiting for unfinished jobs.. 

I have modify noexecstack patches and seems things works.

localhost files # cat gmp-4.1.4-noexecstack.patch
fixed executable stack as per bug #115038 thanks to Petteri Räty

--- gmp-4.1.4/configure
+++ gmp-4.1.4/configure
@@ -21689,6 +21689,7 @@
 fi
 echo "')" >> $gmp_configm4
 echo "define(\`__CONFIG_M4_INCLUDED__')" >> $gmp_configm4
+cat nostackexec>>$gmp_configm4

 # Create Makefiles
 # FIXME: Upcoming version of autoconf/automake may not like broken lines.
--- gmp-4.1.4/nostackexec
+++ gmp-4.1.4/nostackexec
@@ -0,0 +1,3 @@
+#ifdef __ELF__
+#ifdef __arm__
+.section .note.GNU-stack,"",%progbits
+#else
+.section .note.GNU-stack,"",@progbits
+#endif
+#endif

localhost files # cat gmp-4.1.4-nostackexec.patch
--- gmp-4.1.4/acinclude.m4.orig 2005-12-29 19:18:24.000000000 +1100
+++ gmp-4.1.4/acinclude.m4      2005-12-29 19:14:43.000000000 +1100
@@ -878,6 +878,7 @@
 fi
 echo ["')"] >> $gmp_configm4
 echo ["define(\`__CONFIG_M4_INCLUDED__')"] >> $gmp_configm4
+cat nostackexec>>$gmp_configm4
 ])


--- /dev/null   2005-12-18 17:28:06.000000000 +1100
+++ gmp-4.1.4/nostackexec       2005-12-29 19:17:32.000000000 +1100
@@ -0,0 +1,3 @@
+#ifdef __ELF__
+#ifdef __arm__
+.section .note.GNU-stack,"",%progbits
+#else
+.section .note.GNU-stack,"",@progbits
+#endif
+#endif
Comment 2 Jakub Moc (RETIRED) gentoo-dev 2006-03-17 01:58:15 UTC
*** Bug 126505 has been marked as a duplicate of this bug. ***
Comment 3 SpanKY gentoo-dev 2006-03-17 15:16:59 UTC
no need for the extra logic ... '%section' should be fine for everyone
Comment 4 SpanKY gentoo-dev 2006-03-17 16:02:44 UTC
fixed in cvs, thanks for the report