mirror of
https://github.com/fluencelabs/musl
synced 2025-04-25 15:22:15 +00:00
work around gcc 4.8's generation of self-referential mem* functions at -O3
This commit is contained in:
parent
5db951ef80
commit
4a1f55e92f
3
Makefile
3
Makefile
@ -87,6 +87,9 @@ crt/Scrt1.o: CFLAGS += -fPIC
|
|||||||
OPTIMIZE_SRCS = $(wildcard $(OPTIMIZE_GLOBS:%=src/%))
|
OPTIMIZE_SRCS = $(wildcard $(OPTIMIZE_GLOBS:%=src/%))
|
||||||
$(OPTIMIZE_SRCS:%.c=%.o) $(OPTIMIZE_SRCS:%.c=%.lo): CFLAGS += -O3
|
$(OPTIMIZE_SRCS:%.c=%.o) $(OPTIMIZE_SRCS:%.c=%.lo): CFLAGS += -O3
|
||||||
|
|
||||||
|
MEMOPS_SRCS = src/string/memcpy.c src/string/memmove.c src/string/memcmp.c src/string/memset.c
|
||||||
|
$(MEMOPS_SRCS:%.c=%.o) $(MEMOPS_SRCS:%.c=%.lo): CFLAGS += $(CFLAGS_MEMOPS)
|
||||||
|
|
||||||
%.o: $(ARCH)/%.s
|
%.o: $(ARCH)/%.s
|
||||||
$(CC) $(CFLAGS_ALL_STATIC) -c -o $@ $<
|
$(CC) $(CFLAGS_ALL_STATIC) -c -o $@ $<
|
||||||
|
|
||||||
|
10
configure
vendored
10
configure
vendored
@ -104,6 +104,7 @@ fi
|
|||||||
|
|
||||||
CFLAGS_C99FSE=
|
CFLAGS_C99FSE=
|
||||||
CFLAGS_AUTO=
|
CFLAGS_AUTO=
|
||||||
|
CFLAGS_MEMOPS=
|
||||||
LDFLAGS_AUTO=
|
LDFLAGS_AUTO=
|
||||||
OPTIMIZE_GLOBS=
|
OPTIMIZE_GLOBS=
|
||||||
prefix=/usr/local/musl
|
prefix=/usr/local/musl
|
||||||
@ -236,6 +237,14 @@ tryflag CFLAGS_C99FSE -fexcess-precision=standard \
|
|||||||
|| { test "$ARCH" = i386 && tryflag CFLAGS_C99FSE -ffloat-store ; }
|
|| { test "$ARCH" = i386 && tryflag CFLAGS_C99FSE -ffloat-store ; }
|
||||||
tryflag CFLAGS_C99FSE -frounding-math
|
tryflag CFLAGS_C99FSE -frounding-math
|
||||||
|
|
||||||
|
#
|
||||||
|
# Check for options that may be needed to prevent the compiler from
|
||||||
|
# generating self-referential versions of memcpy,, memmove, memcmp,
|
||||||
|
# and memset. Really, we should add a check to determine if this
|
||||||
|
# option is sufficient, and if not, add a macro to cripple these
|
||||||
|
# functions with volatile...
|
||||||
|
#
|
||||||
|
tryflag CFLAGS_MEMOPS -fno-tree-loop-distribute-patterns
|
||||||
|
|
||||||
#
|
#
|
||||||
# If debugging is explicitly enabled, don't auto-enable optimizations
|
# If debugging is explicitly enabled, don't auto-enable optimizations
|
||||||
@ -403,6 +412,7 @@ syslibdir = $syslibdir
|
|||||||
CC = $CC
|
CC = $CC
|
||||||
CFLAGS= $CFLAGS_AUTO $CFLAGS
|
CFLAGS= $CFLAGS_AUTO $CFLAGS
|
||||||
CFLAGS_C99FSE = $CFLAGS_C99FSE
|
CFLAGS_C99FSE = $CFLAGS_C99FSE
|
||||||
|
CFLAGS_MEMOPS = $CFLAGS_MEMOPS
|
||||||
CPPFLAGS = $CPPFLAGS
|
CPPFLAGS = $CPPFLAGS
|
||||||
LDFLAGS = $LDFLAGS_AUTO $LDFLAGS
|
LDFLAGS = $LDFLAGS_AUTO $LDFLAGS
|
||||||
CROSS_COMPILE = $CROSS_COMPILE
|
CROSS_COMPILE = $CROSS_COMPILE
|
||||||
|
Loading…
x
Reference in New Issue
Block a user