diff --git a/external/gpl3/gcc/dist/libgcc/config/alpha/qrnnd.S b/external/gpl3/gcc/dist/libgcc/config/alpha/qrnnd.S index 9b0f30e01a66..85f985e28afe 100644 --- a/external/gpl3/gcc/dist/libgcc/config/alpha/qrnnd.S +++ b/external/gpl3/gcc/dist/libgcc/config/alpha/qrnnd.S @@ -22,8 +22,9 @@ # see the files COPYING3 and COPYING.RUNTIME respectively. If not, see # . -#ifdef __ELF__ +#if defined(__ELF__) && defined(__linux__) .section .note.GNU-stack,"" +.previous #endif .set noreorder diff --git a/external/gpl3/gcc/dist/libgcc/config/i386/morestack.S b/external/gpl3/gcc/dist/libgcc/config/i386/morestack.S index de492e08c58e..34fba503aff9 100644 --- a/external/gpl3/gcc/dist/libgcc/config/i386/morestack.S +++ b/external/gpl3/gcc/dist/libgcc/config/i386/morestack.S @@ -853,7 +853,7 @@ __morestack_make_guard: .quad __morestack_load_mmap #endif -#ifdef __ELF__ +#if defined(__ELF__) && defined(__linux__) .section .note.GNU-stack,"",@progbits .section .note.GNU-split-stack,"",@progbits .section .note.GNU-no-split-stack,"",@progbits diff --git a/external/gpl3/gcc/dist/libitm/config/alpha/sjlj.S b/external/gpl3/gcc/dist/libitm/config/alpha/sjlj.S index 0e51b971fd0e..97e84d16a4bd 100644 --- a/external/gpl3/gcc/dist/libitm/config/alpha/sjlj.S +++ b/external/gpl3/gcc/dist/libitm/config/alpha/sjlj.S @@ -107,6 +107,6 @@ GTM_longjmp: ret .end GTM_longjmp -#ifdef __linux__ +#if defined(__ELF__) && defined(__linux__) .section .note.GNU-stack, "", @progbits #endif diff --git a/external/gpl3/gcc/dist/libitm/config/arm/sjlj.S b/external/gpl3/gcc/dist/libitm/config/arm/sjlj.S index b6b6f5799dd0..0e3fb79651f9 100644 --- a/external/gpl3/gcc/dist/libitm/config/arm/sjlj.S +++ b/external/gpl3/gcc/dist/libitm/config/arm/sjlj.S @@ -159,6 +159,6 @@ GTM_longjmp: cfi_endproc .size GTM_longjmp, . - GTM_longjmp -#ifdef __linux__ +#if defined(__ELF__) && defined(__linux__) .section .note.GNU-stack, "", %progbits #endif diff --git a/external/gpl3/gcc/dist/libitm/config/powerpc/sjlj.S b/external/gpl3/gcc/dist/libitm/config/powerpc/sjlj.S index 4a0b43dbbbdd..8d1c94ff79d8 100644 --- a/external/gpl3/gcc/dist/libitm/config/powerpc/sjlj.S +++ b/external/gpl3/gcc/dist/libitm/config/powerpc/sjlj.S @@ -428,6 +428,6 @@ FUNC GTM_longjmp cfi_endproc END GTM_longjmp -#ifdef __linux__ +#if defined(__ELF__) && defined(__linux__) .section .note.GNU-stack, "", @progbits #endif diff --git a/external/gpl3/gcc/dist/libitm/config/s390/sjlj.S b/external/gpl3/gcc/dist/libitm/config/s390/sjlj.S index 592d9af2cfd4..7003ca663ec4 100644 --- a/external/gpl3/gcc/dist/libitm/config/s390/sjlj.S +++ b/external/gpl3/gcc/dist/libitm/config/s390/sjlj.S @@ -105,4 +105,6 @@ GTM_longjmp: .size GTM_longjmp, .-GTM_longjmp +#if defined(__ELF__) && defined(__linux__) .section .note.GNU-stack, "", @progbits +#endif diff --git a/external/gpl3/gcc/dist/libitm/config/sh/sjlj.S b/external/gpl3/gcc/dist/libitm/config/sh/sjlj.S index bed543de90ec..2b7498d2f7ed 100644 --- a/external/gpl3/gcc/dist/libitm/config/sh/sjlj.S +++ b/external/gpl3/gcc/dist/libitm/config/sh/sjlj.S @@ -117,6 +117,6 @@ GTM_longjmp: .size GTM_longjmp, . - GTM_longjmp -#ifdef __linux__ +#if defined(__ELF__) && defined(__linux__) .section .note.GNU-stack, "", %progbits #endif diff --git a/external/gpl3/gcc/dist/libitm/config/sparc/sjlj.S b/external/gpl3/gcc/dist/libitm/config/sparc/sjlj.S index cd6461a08879..59360b3ceda2 100644 --- a/external/gpl3/gcc/dist/libitm/config/sparc/sjlj.S +++ b/external/gpl3/gcc/dist/libitm/config/sparc/sjlj.S @@ -92,6 +92,6 @@ GTM_longjmp: cfi_endproc .size GTM_longjmp, . - GTM_longjmp -#ifdef __linux__ +#if defined(__ELF__) && defined(__linux__) .section .note.GNU-stack, "", @progbits #endif diff --git a/external/gpl3/gcc/dist/libitm/config/x86/sjlj.S b/external/gpl3/gcc/dist/libitm/config/x86/sjlj.S index 993f698652c1..f8e2e415d95c 100644 --- a/external/gpl3/gcc/dist/libitm/config/x86/sjlj.S +++ b/external/gpl3/gcc/dist/libitm/config/x86/sjlj.S @@ -142,6 +142,6 @@ SYM(GTM_longjmp): HIDDEN(GTM_longjmp) SIZE(GTM_longjmp) -#ifdef __linux__ +#if defined(__ELF__) && defined(__linux__) .section .note.GNU-stack, "", @progbits #endif diff --git a/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S b/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S index 1c0f6a8a440c..397e78a97302 100644 --- a/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S +++ b/external/gpl3/gcc/dist/libsanitizer/tsan/tsan_rtl_amd64.S @@ -166,7 +166,7 @@ __tsan_report_race_thunk: ret .cfi_endproc -#ifdef __linux__ +#if defined(__ELF__) && defined(__linux__) /* We do not need executable stack. */ .section .note.GNU-stack,"",@progbits #endif