diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2019-08-06 12:04:27 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2019-10-08 11:06:57 +0100 |
commit | 1e0c802338af8efd3c1d46174fffbbdba3774629 (patch) | |
tree | d2d39df2765c45d784b4fb8a6c0d35f19a7fdf78 | |
parent | 8dcd0638e4246ecd0de10892166f445df3f36ae7 (diff) | |
download | arm-optimized-routines-1e0c802338af8efd3c1d46174fffbbdba3774629.tar.gz |
Use CFLAGS_SHARED for shared libraries
Allows optimizing the code in shared libraries differently.
Has significant effect on literal loads in simd code.
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | config.mk.dist | 3 |
2 files changed, 5 insertions, 1 deletions
@@ -30,6 +30,7 @@ AR = $(CROSS_COMPILE)ar RANLIB = $(CROSS_COMPILE)ranlib INSTALL = install +CFLAGS_SHARED = -fPIC CFLAGS_ALL = -Ibuild/include $(CPPFLAGS) $(CFLAGS) LDFLAGS_ALL = $(LDFLAGS) @@ -50,7 +51,7 @@ $(ALL_LIBS) $(ALL_TOOLS) $(ALL_OBJS) $(ALL_OBJS:%.o=%.os) $(ALL_INCLUDES): | $(A $(ALL_DIRS): mkdir -p $@ -$(ALL_OBJS:%.o=%.os): CFLAGS_ALL += -fPIC +$(ALL_OBJS:%.o=%.os): CFLAGS_ALL += $(CFLAGS_SHARED) build/%.o: $(srcdir)/%.S $(CC) $(CFLAGS_ALL) -c -o $@ $< diff --git a/config.mk.dist b/config.mk.dist index 36f67d8..0cf4e5a 100644 --- a/config.mk.dist +++ b/config.mk.dist @@ -15,6 +15,9 @@ CFLAGS += -Wall -Wno-missing-braces HOST_CFLAGS += -g CFLAGS += -g +# Optimize the shared libraries on aarch64 assuming they fit in 1M. +#CFLAGS_SHARED = -fPIC -mcmodel=tiny + # Use if mpfr is available on the target for ulp error checking. #LDLIBS += -lmpfr -lgmp #CFLAGS += -DUSE_MPFR |