mirror of
git://git.musl-libc.org/musl
synced 2024-11-27 03:53:58 +08:00
allow subarch-specific asm, including asm specific to the default
the default subarch is the one whose full name is just the base arch name, with no suffixes. normally, either the asm in the default subarch is suitable for all subarch variants, or separate asm is mandatory for each variant. however, in the case of asm which is purely for optimization purposes, it's possible to have asm that only works (or only performs well) on the default subarch, and not any othe the other variants. thus, I have added a mechanism to give a name to the default variant, for example "armel" for the default, little-endian arm. further such default-subarch names can be added in the future as needed.
This commit is contained in:
parent
7c440977db
commit
90d7772251
3
Makefile
3
Makefile
@ -90,6 +90,9 @@ $(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)$(ASMSUBARCH)/%.s
|
||||
$(CC) $(CFLAGS_ALL_STATIC) -c -o $@ $<
|
||||
|
||||
%.o: $(ARCH)/%.s
|
||||
$(CC) $(CFLAGS_ALL_STATIC) -c -o $@ $<
|
||||
|
||||
|
6
configure
vendored
6
configure
vendored
@ -393,6 +393,11 @@ test "$ARCH" = "microblaze" && trycppif __MICROBLAZEEL__ "$t" \
|
||||
test "$SUBARCH" \
|
||||
&& printf "configured for %s variant: %s\n" "$ARCH" "$ARCH$SUBARCH"
|
||||
|
||||
case "$ARCH$SUBARCH" in
|
||||
arm) ASMSUBARCH=el ;;
|
||||
*) ASMSUBARCH=$SUBARCH ;;
|
||||
esac
|
||||
|
||||
#
|
||||
# Some archs (powerpc) have different possible long double formats
|
||||
# that the compiler can be configured for. The logic for whether this
|
||||
@ -424,6 +429,7 @@ cat << EOF
|
||||
# Any changes made here will be lost if configure is re-run
|
||||
ARCH = $ARCH
|
||||
SUBARCH = $SUBARCH
|
||||
ASMSUBARCH = $ASMSUBARCH
|
||||
prefix = $prefix
|
||||
exec_prefix = $exec_prefix
|
||||
bindir = $bindir
|
||||
|
Loading…
Reference in New Issue
Block a user