Gentoo Archives: gentoo-commits

From: Mike Frysinger <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/sandbox:master commit in: /
Date: Sun, 20 Sep 2015 08:15:33
Message-Id: 1442730758.5923bf16687481d275aa8d2e8ebaf4d9c5b32676.vapier@gentoo
1 commit: 5923bf16687481d275aa8d2e8ebaf4d9c5b32676
2 Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
3 AuthorDate: Sun Sep 20 06:32:38 2015 +0000
4 Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
5 CommitDate: Sun Sep 20 06:32:38 2015 +0000
6 URL: https://gitweb.gentoo.org/proj/sandbox.git/commit/?id=5923bf16
7
8 build: do not let gcc rewrite memory calls
9
10 We don't want gcc to rewrite malloc/memset calls to calloc as it
11 will make calloc recursively call itself. Add other memory calls
12 just to be safe.
13
14 Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
15
16 configure.ac | 4 ++++
17 1 file changed, 4 insertions(+)
18
19 diff --git a/configure.ac b/configure.ac
20 index 686ae4d..73227db 100644
21 --- a/configure.ac
22 +++ b/configure.ac
23 @@ -391,6 +391,10 @@ AC_DEFUN([SB_CHECK_CFLAG],[AX_CHECK_COMPILE_FLAG([$1],[CFLAGS="$CFLAGS $1"])])
24 SB_CHECK_CFLAG([-Winvalid-pch])
25 SB_CHECK_CFLAG([-fdata-sections])
26 SB_CHECK_CFLAG([-ffunction-sections])
27 +dnl We have our own wrapped memory functions.
28 +SB_CHECK_CFLAG([-fno-builtin-calloc])
29 +SB_CHECK_CFLAG([-fno-builtin-malloc])
30 +SB_CHECK_CFLAG([-fno-builtin-realloc])
31 AC_DEFUN([SB_CHECK_LDFLAG],[AX_CHECK_LINK_FLAG([-Wl,$1],[LDFLAGS="$LDFLAGS -Wl,$1"])])
32 SB_CHECK_LDFLAG([--as-needed])
33 SB_CHECK_LDFLAG([--gc-sections])