only scan for exec stacks on linux/glibc hosts
authorMike Frysinger <vapier@gentoo.org>
Mon, 6 Mar 2006 02:53:38 +0000 (02:53 -0000)
committerMike Frysinger <vapier@gentoo.org>
Mon, 6 Mar 2006 02:53:38 +0000 (02:53 -0000)
svn path=/main/trunk/; revision=2819

bin/ebuild.sh

index a28d98e3068fda3126850db763246a4466a5e06d..b369d1f38ef6707427b7a9d8dfc9963757293b29 100755 (executable)
@@ -1147,14 +1147,19 @@ dyn_install() {
                        sleep 1
                fi
 
-               # Check for files with executable stacks, but only on arches which
-               # are supported at the moment.  Keep this list in sync with
-               # http://hardened.gentoo.org/gnu-stack.xml (Arch Status)
+               # Also, executable stacks only matter on linux (and just glibc atm ...)
                case ${CTARGET:-${CHOST}} in
-                       i?86*|ia64*|m68k*|powerpc64*|s390*|x86_64*)
-                               f=$(scanelf -qyRF '%e %p' "${D}") ;;
-                       *)
-                               f="" ;;
+                       *-linux-gnu*)
+                       # Check for files with executable stacks, but only on arches which
+                       # are supported at the moment.  Keep this list in sync with
+                       # http://hardened.gentoo.org/gnu-stack.xml (Arch Status)
+                       case ${CTARGET:-${CHOST}} in
+                               i?86*|ia64*|m68k*|powerpc64*|s390*|x86_64*)
+                                       f=$(scanelf -qyRF '%e %p' "${D}") ;;
+                               *)
+                                       f="" ;;
+                       esac
+                       ;;
                esac
                if [[ -n ${f} ]] ; then
                        # One more pass to help devs track down the source