Ensure that the GMP ARM extra file has the correct extension (#3178)

* Ensure that the GMP ARM extra file has the correct extension

We hardcoded in some places the extension of the GMP ARM extra file
with .o, however the Makefile rule to build the file will use .lo is
--enable-shared is enabled. This commit fixes the discrepancy by not
hardcoding the extension anywhere.

Fixes #3176

* Avoid gnu make extension

* Replace spaces to conform with other lines

* Ensure we only add extension if file is needed

* Move the LTO definition to the configure.ac

* Carry the LTO variable into the Makefile

* Fix variable reference

* Add variable definition to gc2 Makefile

* annotate assignment
This commit is contained in:
Paulo Matos 2020-05-12 21:04:59 +02:00 committed by GitHub
parent 03c978d2e8
commit 8ff7b4cc86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 7 deletions

View File

@ -4887,7 +4887,7 @@ case "$host_os" in
ppc|powerpc) ppc|powerpc)
;; ;;
alpha) alpha)
EXTRA_GMP_OBJ="gmp_alpha_gcc.o" EXTRA_GMP_OBJ='gmp_alpha_gcc.$(LTO)'
EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)' EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)'
;; ;;
i386|i486|i586|i686) i386|i486|i586|i686)
@ -4895,7 +4895,7 @@ case "$host_os" in
check_for_unwind=REG_ESP check_for_unwind=REG_ESP
;; ;;
arm*) arm*)
EXTRA_GMP_OBJ="gmp_arm_gcc.o" EXTRA_GMP_OBJ='gmp_arm_gcc.$(LTO)'
EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)' EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)'
;; ;;
*) *)
@ -4907,7 +4907,7 @@ case "$host_os" in
if test "$CC" = "cc" ; then if test "$CC" = "cc" ; then
COMPFLAGS="$COMPFLAGS -ieee_with_inexact -assume noaligned_objects" COMPFLAGS="$COMPFLAGS -ieee_with_inexact -assume noaligned_objects"
elif test "$CC" = "gcc" ; then elif test "$CC" = "gcc" ; then
EXTRA_GMP_OBJ="gmp_alpha_gcc.o" EXTRA_GMP_OBJ='gmp_alpha_gcc.$(LTO)'
EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)' EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)'
fi fi
;; ;;

View File

@ -612,7 +612,7 @@ case "$host_os" in
ppc|powerpc) ppc|powerpc)
;; ;;
alpha) alpha)
EXTRA_GMP_OBJ="gmp_alpha_gcc.o" EXTRA_GMP_OBJ='gmp_alpha_gcc.$(LTO)'
EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)' EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)'
;; ;;
i386|i486|i586|i686) i386|i486|i586|i686)
@ -620,7 +620,7 @@ case "$host_os" in
check_for_unwind=REG_ESP check_for_unwind=REG_ESP
;; ;;
arm*) arm*)
EXTRA_GMP_OBJ="gmp_arm_gcc.o" EXTRA_GMP_OBJ='gmp_arm_gcc.$(LTO)'
EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)' EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)'
;; ;;
*) *)
@ -632,7 +632,7 @@ case "$host_os" in
if test "$CC" = "cc" ; then if test "$CC" = "cc" ; then
COMPFLAGS="$COMPFLAGS -ieee_with_inexact -assume noaligned_objects" COMPFLAGS="$COMPFLAGS -ieee_with_inexact -assume noaligned_objects"
elif test "$CC" = "gcc" ; then elif test "$CC" = "gcc" ; then
EXTRA_GMP_OBJ="gmp_alpha_gcc.o" EXTRA_GMP_OBJ='gmp_alpha_gcc.$(LTO)'
EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)' EXTRA_GMP_DEP='$(EXTRA_GMP_DEP_FILE)'
fi fi
;; ;;

View File

@ -581,6 +581,7 @@ LIBRKTIO_FOR_DLL = $(LIBRKTIO_FOR_DLL_@LIBSFX@)
LIBRKTIO_FOR_LIB = $(LIBRKTIO_FOR_LIB_@LIBSFX@) LIBRKTIO_FOR_LIB = $(LIBRKTIO_FOR_LIB_@LIBSFX@)
LIBRKTIO_UP_FOR_LIB = $(LIBRKTIO_UP_FOR_LIB_@LIBSFX@) LIBRKTIO_UP_FOR_LIB = $(LIBRKTIO_UP_FOR_LIB_@LIBSFX@)
LTO=@LTO@ # Need for replacement of EXTRA_GMP_OBJ which carries the variable
EXTRA_GMP_DEP_FILE = $(SRCDIR)/@EXTRA_GMP_OBJ@ EXTRA_GMP_DEP_FILE = $(SRCDIR)/@EXTRA_GMP_OBJ@
EXTRA_GMP = @EXTRA_GMP_DEP@ EXTRA_GMP = @EXTRA_GMP_DEP@

View File

@ -13,6 +13,7 @@ CFLAGS = @CFLAGS@ @COMPFLAGS@ @PROFFLAGS@
CPPFLAGS = @PREFLAGS@ CPPFLAGS = @PREFLAGS@
RKTIO_INC = -I$(srcdir)/../../rktio -I../../rktio RKTIO_INC = -I$(srcdir)/../../rktio -I../../rktio
ALL_CFLAGS = $(CFLAGS) -I$(builddir)/.. -I$(srcdir)/../include $(RKTIO_INC) $(CPPFLAGS) @OPTIONS@ @MZOPTIONS@ ALL_CFLAGS = $(CFLAGS) -I$(builddir)/.. -I$(srcdir)/../include $(RKTIO_INC) $(CPPFLAGS) @OPTIONS@ @MZOPTIONS@
LTO=@LTO@ # Need for replacement of EXTRA_GMP_OBJ which carries the variable
OBJS = salloc.@LTO@ \ OBJS = salloc.@LTO@ \
bignum.@LTO@ \ bignum.@LTO@ \
@ -71,7 +72,8 @@ OBJS = salloc.@LTO@ \
type.@LTO@ \ type.@LTO@ \
unwind.@LTO@ \ unwind.@LTO@ \
validate.@LTO@ \ validate.@LTO@ \
vector.@LTO@ @EXTRA_GMP_OBJ@ vector.@LTO@ \
@EXTRA_GMP_OBJ@
SRCS = $(srcdir)/salloc.c \ SRCS = $(srcdir)/salloc.c \
$(srcdir)/bignum.c \ $(srcdir)/bignum.c \