Make stdlib/testmb compile when _FORTIFY_SOURCE is not predefined 2
Checks
Context |
Check |
Description |
dj/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
dj/TryBot-32bit |
success
|
Build for i686
|
Commit Message
Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
---
stdlib/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On 2023-01-27 14:48, Andreas K. Hüttel via Libc-alpha wrote:
> Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org>
> ---
Sam had posted this exact same patch ~6 months ago:
https://patchwork.sourceware.org/project/glibc/patch/20220805201358.2348750-1-sam@gentoo.org/
We had agreed then to use the result of libc_cv_predef_fortify_source
then, maybe tweaking that check to find the fortification level and
passing it here. But maybe that's too much engineering for this little
test.
I'm OK with this change as is; Sam, could you please push your patch
after Carlos is done with the 2.37 release?
Thanks,
Sid
LGTM.
Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
> stdlib/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/stdlib/Makefile b/stdlib/Makefile
> index e0fc82fc4d..83391d00c1 100644
> --- a/stdlib/Makefile
> +++ b/stdlib/Makefile
> @@ -392,7 +392,7 @@ CFLAGS-tst-qsort.c += $(stack-align-test-flags)
> CFLAGS-tst-makecontext.c += -funwind-tables
> CFLAGS-tst-makecontext2.c += $(stack-align-test-flags)
>
> -CFLAGS-testmb.c += -D_FORTIFY_SOURCE=2 -Wall -Werror
> +CFLAGS-testmb.c += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Werror
>
>
> # Run a test on the header files we use.
>
> I'm OK with this change as is; Sam, could you please push your patch
> after Carlos is done with the 2.37 release?
>
Neither Sam nor me can push... :)
On 2023-01-27 18:45, Andreas K. Huettel wrote:
>>
>> I'm OK with this change as is; Sam, could you please push your patch
>> after Carlos is done with the 2.37 release?
>>
>
> Neither Sam nor me can push... :)
>
Ahh! In that case I'll remember to push as soon as Carlos is done
cutting the release next week :)
Sid
@@ -392,7 +392,7 @@ CFLAGS-tst-qsort.c += $(stack-align-test-flags)
CFLAGS-tst-makecontext.c += -funwind-tables
CFLAGS-tst-makecontext2.c += $(stack-align-test-flags)
-CFLAGS-testmb.c += -D_FORTIFY_SOURCE=2 -Wall -Werror
+CFLAGS-testmb.c += -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -Wall -Werror
# Run a test on the header files we use.