[Bug #20524] win32: Try to configure GMP if available
This commit is contained in:
parent
f8abd24b1f
commit
065190a973
@ -297,9 +297,7 @@ CXXFLAGS = $(CFLAGS)
|
|||||||
!if !defined(LDFLAGS)
|
!if !defined(LDFLAGS)
|
||||||
LDFLAGS = -incremental:no -debug -opt:ref -opt:icf
|
LDFLAGS = -incremental:no -debug -opt:ref -opt:icf
|
||||||
!endif
|
!endif
|
||||||
!if !defined(XLDFLAGS)
|
XLDFLAGS = -stack:$(STACK) $(XLDFLAGS)
|
||||||
XLDFLAGS = -stack:$(STACK)
|
|
||||||
!endif
|
|
||||||
!if !defined(RFLAGS)
|
!if !defined(RFLAGS)
|
||||||
RFLAGS = -r
|
RFLAGS = -r
|
||||||
!endif
|
!endif
|
||||||
@ -1147,7 +1145,8 @@ miniruby: miniruby$(EXEEXT)
|
|||||||
miniruby$(EXEEXT):
|
miniruby$(EXEEXT):
|
||||||
@echo $(LIBS)
|
@echo $(LIBS)
|
||||||
$(ECHO) linking $(@:\=/)
|
$(ECHO) linking $(@:\=/)
|
||||||
$(Q) $(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(LIBS) -Fe$@ -link $(LDFLAGS)
|
$(Q) $(PURIFY) $(CC) $(MAINOBJ) $(MINIOBJS) $(COMMONOBJS) $(LIBS) \
|
||||||
|
$(OUTFLAG)$@ -link $(LDFLAGS) $(XLDFLAGS)
|
||||||
@$(RM) miniruby.lib miniruby.exp
|
@$(RM) miniruby.lib miniruby.exp
|
||||||
$(Q) miniruby.exe -v
|
$(Q) miniruby.exe -v
|
||||||
$(Q) $(LDSHARED_1)
|
$(Q) $(LDSHARED_1)
|
||||||
@ -1217,7 +1216,8 @@ $(LIBRUBY_SO): $(LIBRUBY_A) $(DLDOBJS) $(RUBYDEF) $(RUBY_SO_NAME).res
|
|||||||
!endif
|
!endif
|
||||||
$(ECHO) linking shared-library $(@:\=/)
|
$(ECHO) linking shared-library $(@:\=/)
|
||||||
$(Q) $(LDSHARED) $(DLDOBJS) $(LIBRUBY_A) \
|
$(Q) $(LDSHARED) $(DLDOBJS) $(LIBRUBY_A) \
|
||||||
$(RUBY_SO_NAME).res $(SOLIBS) $(EXTSOLIBS) $(LIBS) -Fe$@ -link $(LDFLAGS) \
|
$(RUBY_SO_NAME).res $(SOLIBS) $(EXTSOLIBS) $(LIBS) \
|
||||||
|
$(OUTFLAG)$@ -link $(LDFLAGS) $(XLDFLAGS) \
|
||||||
$(LIBRUBY_DLDFLAGS)
|
$(LIBRUBY_DLDFLAGS)
|
||||||
@$(RM) dummy.lib dummy.exp
|
@$(RM) dummy.lib dummy.exp
|
||||||
!if defined(LDSHARED_0)
|
!if defined(LDSHARED_0)
|
||||||
@ -1430,7 +1430,7 @@ rubyspec-capiext: $(RUBYSPEC_CAPIEXT_EXTS)
|
|||||||
$(Q)$(MAKEDIRS) $(@D)
|
$(Q)$(MAKEDIRS) $(@D)
|
||||||
$(Q)echo> $*.def EXPORTS
|
$(Q)echo> $*.def EXPORTS
|
||||||
$(Q)echo>> $*.def Init_$(*F)
|
$(Q)echo>> $*.def Init_$(*F)
|
||||||
$(Q)$(LDSHARED) -Fe$(@) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) $< $(LIBRUBYARG) -link $(DLDFLAGS) $(LIBS) $(LOCAL_LIBS) -implib:$*.lib -pdb:$*.pdb -def:$*.def
|
$(Q)$(LDSHARED) -Fe$(@) $(INCFLAGS) $(CFLAGS) $(CPPFLAGS) $< $(LIBRUBYARG) -link $(DLDFLAGS) $(XLDFLAGS) $(LIBS) $(LOCAL_LIBS) -implib:$*.lib -pdb:$*.pdb -def:$*.def
|
||||||
!if defined(LDSHARED_0)
|
!if defined(LDSHARED_0)
|
||||||
$(Q)$(LDSHARED_0)
|
$(Q)$(LDSHARED_0)
|
||||||
$(Q)$(LDSHARED_1)
|
$(Q)$(LDSHARED_1)
|
||||||
|
@ -7,6 +7,9 @@ for %%I in (%0) do if /%%~dpI/ == /%CD%\/ (
|
|||||||
exit /b 999
|
exit /b 999
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set XINCFLAGS=
|
||||||
|
set XLDFLAGS=
|
||||||
|
|
||||||
echo> ~tmp~.mak ####
|
echo> ~tmp~.mak ####
|
||||||
echo>> ~tmp~.mak conf = %0
|
echo>> ~tmp~.mak conf = %0
|
||||||
echo>> ~tmp~.mak $(conf): nul
|
echo>> ~tmp~.mak $(conf): nul
|
||||||
@ -48,7 +51,9 @@ if "%1" == "--with-git" goto :git
|
|||||||
if "%1" == "--without-git" goto :nogit
|
if "%1" == "--without-git" goto :nogit
|
||||||
if "%1" == "--without-ext" goto :witharg
|
if "%1" == "--without-ext" goto :witharg
|
||||||
if "%1" == "--without-extensions" goto :witharg
|
if "%1" == "--without-extensions" goto :witharg
|
||||||
|
if "%1" == "--with-opt-dir" goto :opt-dir
|
||||||
if "%1" == "--with-gmp" goto :gmp
|
if "%1" == "--with-gmp" goto :gmp
|
||||||
|
if "%1" == "--with-gmp-dir" goto :gmp-dir
|
||||||
if "%opt:~0,10%" == "--without-" goto :withoutarg
|
if "%opt:~0,10%" == "--without-" goto :withoutarg
|
||||||
if "%opt:~0,7%" == "--with-" goto :witharg
|
if "%opt:~0,7%" == "--with-" goto :witharg
|
||||||
if "%1" == "-h" goto :help
|
if "%1" == "-h" goto :help
|
||||||
@ -217,6 +222,10 @@ goto :loop ;
|
|||||||
shift
|
shift
|
||||||
shift
|
shift
|
||||||
goto :loop ;
|
goto :loop ;
|
||||||
|
:gmp-dir
|
||||||
|
:opt-dir
|
||||||
|
set XINCFLAGS=%XINCFLAGS% -I%2/include
|
||||||
|
set XLDFLAGS=%XLDFLAGS% -libpath:%2/lib
|
||||||
:witharg
|
:witharg
|
||||||
echo>>confargs.tmp %1=%2\
|
echo>>confargs.tmp %1=%2\
|
||||||
set witharg=1
|
set witharg=1
|
||||||
@ -263,6 +272,8 @@ cl -EP confargs.c > ~setup~.mak 2>nul
|
|||||||
if exist pathlist.tmp echo>>~setup~.mak PATH = $(pathlist:;=/bin;)$(PATH)
|
if exist pathlist.tmp echo>>~setup~.mak PATH = $(pathlist:;=/bin;)$(PATH)
|
||||||
if exist pathlist.tmp echo>>~setup~.mak INCLUDE = $(pathlist:;=/include;)
|
if exist pathlist.tmp echo>>~setup~.mak INCLUDE = $(pathlist:;=/include;)
|
||||||
if exist pathlist.tmp echo>>~setup~.mak LIB = $(pathlist:;=/lib;)
|
if exist pathlist.tmp echo>>~setup~.mak LIB = $(pathlist:;=/lib;)
|
||||||
|
echo>>~setup~.mak XINCFLAGS = %XINCFLAGS%
|
||||||
|
echo>>~setup~.mak XLDFLAGS = %XLDFLAGS%
|
||||||
type>>~setup~.mak ~tmp~.mak
|
type>>~setup~.mak ~tmp~.mak
|
||||||
del *.tmp > nul
|
del *.tmp > nul
|
||||||
del ~tmp~.mak > nul
|
del ~tmp~.mak > nul
|
||||||
|
@ -62,6 +62,12 @@ ENABLE_DEBUG_ENV = $(ENABLE_DEBUG_ENV)
|
|||||||
!if defined(RJIT_SUPPORT)
|
!if defined(RJIT_SUPPORT)
|
||||||
RJIT_SUPPORT = $(RJIT_SUPPORT)
|
RJIT_SUPPORT = $(RJIT_SUPPORT)
|
||||||
!endif
|
!endif
|
||||||
|
!if defined(XINCFLAGS)
|
||||||
|
CPPFLAGS = $(XINCFLAGS)
|
||||||
|
!endif
|
||||||
|
!if defined(XLDFLAGS)
|
||||||
|
XLDFLAGS = $(XLDFLAGS)
|
||||||
|
!endif
|
||||||
|
|
||||||
# TOOLS
|
# TOOLS
|
||||||
<<
|
<<
|
||||||
@ -79,8 +85,13 @@ RJIT_SUPPORT = $(RJIT_SUPPORT)
|
|||||||
@echo HAVE_GIT = $(HAVE_GIT)>> $(MAKEFILE)
|
@echo HAVE_GIT = $(HAVE_GIT)>> $(MAKEFILE)
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
!if "$(WITH_GMP)" == "yes"
|
!if "$(WITH_GMP)" != "no"
|
||||||
@echo>>$(MAKEFILE) USE_GMP = 1
|
@($(CC) $(XINCFLAGS) <<conftest.c -link $(XLDFLAGS) gmp.lib > nul && (echo USE_GMP = yes) || (echo USE_GMP = no)) >>$(MAKEFILE)
|
||||||
|
#include <gmp.h>
|
||||||
|
mpz_t x;
|
||||||
|
int main(void) {mpz_init(x); return 0;}
|
||||||
|
<<
|
||||||
|
@$(WIN32DIR:/=\)\rm.bat conftest.*
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
-osname-section-:
|
-osname-section-:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user