mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Enable MJIT on AIX
* configure.ac: disable using __builtin_setjmp to avoid errors when execution globally jumps out of JITted code. Specify -std=gnu99 to JIT compilation to avoid errors regarding the "restrict" keyword in the precompiled header. Specify -shared in addition to -Wl,-G when building shared libraries to make mjit_build_dir.so expose the MJIT_BUILD_DIR symbol. Use LDR_PRELOAD to load mjit_build_dir.so. * mjit_worker.c: do not specify -nodefaultlibs or -nostdlibs because on AIX JITted code internally refers to the memcpy function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2dd614af67
commit
d612c44dad
2 changed files with 12 additions and 3 deletions
13
configure.ac
13
configure.ac
|
@ -996,6 +996,7 @@ main()
|
|||
],
|
||||
[aix*],[ LIBS="-lm $LIBS"
|
||||
ac_cv_func_round=no
|
||||
ac_cv_func___builtin_setjmp=no
|
||||
],
|
||||
[linux*],[ LIBS="-lm $LIBS"
|
||||
# __builtin_longjmp in ppc64* Linux does not restore
|
||||
|
@ -2563,7 +2564,10 @@ AC_SUBST(ARCH_FLAG)dnl
|
|||
AC_SUBST(MJIT_HEADER_FLAGS)dnl
|
||||
AC_SUBST(MJIT_HEADER_INSTALL_DIR)dnl
|
||||
AC_SUBST(MJIT_CC)dnl
|
||||
AC_SUBST(MJIT_CFLAGS, [${MJIT_CFLAGS-"-w ${orig_cflags}"}])dnl
|
||||
AS_IF([test "$GCC" = "yes"], [
|
||||
AS_CASE(["$target_os"],[aix*],[mjit_std_cflag="-std=gnu99"])
|
||||
])
|
||||
AC_SUBST(MJIT_CFLAGS, [${MJIT_CFLAGS-"-w ${mjit_std_cflag} ${orig_cflags}"}])dnl
|
||||
AC_SUBST(MJIT_OPTFLAGS, [${MJIT_OPTFLAGS-'$(optflags)'}])dnl
|
||||
AC_SUBST(MJIT_DEBUGFLAGS, [${MJIT_DEBUGFLAGS-'$(debugflags)'}])dnl
|
||||
AC_SUBST(MJIT_LDSHARED)dnl
|
||||
|
@ -2679,7 +2683,11 @@ AS_IF([test "$with_dln_a_out" != yes], [
|
|||
: ${PRELOADENV=DYLD_INSERT_LIBRARIES}
|
||||
rb_cv_dlopen=yes],
|
||||
[aix*], [ : ${LDSHARED='$(CC)'}
|
||||
LDSHARED="$LDSHARED ${linker_flag}-G"
|
||||
AS_IF([test "$GCC" = yes], [
|
||||
LDSHARED="$LDSHARED ${linker_flag}-G -shared"
|
||||
], [
|
||||
LDSHARED="$LDSHARED ${linker_flag}-G"
|
||||
])
|
||||
EXTDLDFLAGS='-e$(TARGET_ENTRY)'
|
||||
XLDFLAGS="${linker_flag}"'-bE:$(ARCHFILE)'" ${linker_flag}-brtl"
|
||||
XLDFLAGS="$XLDFLAGS ${linker_flag}-blibpath:${prefix}/lib:${LIBPATH:-/usr/lib:/lib}"
|
||||
|
@ -2687,6 +2695,7 @@ AS_IF([test "$with_dln_a_out" != yes], [
|
|||
TRY_LINK='$(CC) -oconftest $(INCFLAGS) -I$(hdrdir) $(CPPFLAGS)'
|
||||
TRY_LINK="$TRY_LINK"' $(CFLAGS) $(src) $(LIBPATH) $(LDFLAGS) $(LOCAL_LIBS) $(LIBS)'
|
||||
: ${LIBPATHENV=LIBPATH}
|
||||
: ${PRELOADENV=LDR_PRELOAD}
|
||||
rb_cv_dlopen=yes],
|
||||
[nto-qnx*], [ DLDFLAGS="$DLDFLAGS -L/lib -L/usr/lib -L/usr/local/lib"
|
||||
: ${LDSHARED='$(LD) -Bshareable -x'}
|
||||
|
|
|
@ -260,7 +260,7 @@ static const char *const CC_DLDFLAGS_ARGS[] = {
|
|||
MJIT_DLDFLAGS
|
||||
#if defined __GNUC__ && !defined __clang__
|
||||
"-nostartfiles",
|
||||
# if !defined(_WIN32) && !defined(__CYGWIN__)
|
||||
# if !defined(_WIN32) && !defined(__CYGWIN__) && !defined(_AIX)
|
||||
"-nodefaultlibs", "-nostdlib",
|
||||
# endif
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue