mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* configure.in: keep ARCH_FLAG separate. export ARCH_FLAG.
[ruby-core:01819] * Makefile.in: add ARCH_FLAG to CFLAGS. * Makefile.in: add @CPPFLAGS@ to CPPFLAGS. * lib/mkmf.rb (link_command, cc_command): use ARCH_FLAG. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5063 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
9a8cc1f4ab
commit
c3f1c5280b
3 changed files with 21 additions and 11 deletions
11
ChangeLog
11
ChangeLog
|
@ -1,3 +1,14 @@
|
||||||
|
Sun Nov 30 20:18:07 2003 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||||
|
|
||||||
|
* configure.in: keep ARCH_FLAG separate. export ARCH_FLAG.
|
||||||
|
[ruby-core:01819]
|
||||||
|
|
||||||
|
* Makefile.in: add ARCH_FLAG to CFLAGS.
|
||||||
|
|
||||||
|
* Makefile.in: add @CPPFLAGS@ to CPPFLAGS.
|
||||||
|
|
||||||
|
* lib/mkmf.rb (link_command, cc_command): use ARCH_FLAG.
|
||||||
|
|
||||||
Sun Nov 30 18:22:48 2003 WATANABE Hirofumi <eban@ruby-lang.org>
|
Sun Nov 30 18:22:48 2003 WATANABE Hirofumi <eban@ruby-lang.org>
|
||||||
|
|
||||||
* configure.in: do not override CCDLDFLAGS, LDFLAGS, XLDFLAGS,
|
* configure.in: do not override CCDLDFLAGS, LDFLAGS, XLDFLAGS,
|
||||||
|
|
11
configure.in
11
configure.in
|
@ -793,6 +793,7 @@ esac
|
||||||
LIBEXT=a
|
LIBEXT=a
|
||||||
|
|
||||||
AC_SUBST(DLDFLAGS)dnl
|
AC_SUBST(DLDFLAGS)dnl
|
||||||
|
AC_SUBST(ARCH_FLAG)dnl
|
||||||
|
|
||||||
AC_SUBST(STATIC)dnl
|
AC_SUBST(STATIC)dnl
|
||||||
AC_SUBST(CCDLFLAGS)dnl
|
AC_SUBST(CCDLFLAGS)dnl
|
||||||
|
@ -894,19 +895,15 @@ if test "$with_dln_a_out" != yes; then
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
nextstep*) : ${LDSHARED='cc -r -nostdlib'}
|
nextstep*) : ${LDSHARED='cc -r -nostdlib'}
|
||||||
LDFLAGS="$LDFLAGS -u libsys_s"
|
LDFLAGS="$LDFLAGS -u libsys_s"
|
||||||
DLDFLAGS="$DLDFLAGS $ARCH_FLAG"
|
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
openstep*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress'}
|
openstep*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress'}
|
||||||
: ${LDFLAGS=""}
|
: ${LDFLAGS=""}
|
||||||
DLDFLAGS="$DLDFLAGS $ARCH_FLAG"
|
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
rhapsody*) : $LDSHARED='cc -dynamic -bundle -undefined suppress'}
|
rhapsody*) : $LDSHARED='cc -dynamic -bundle -undefined suppress'}
|
||||||
: ${LDFLAGS=""}
|
: ${LDFLAGS=""}
|
||||||
DLDFLAGS="$DLDFLAGS $ARCH_FLAG"
|
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
darwin*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress -flat_namespace'}
|
darwin*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress -flat_namespace'}
|
||||||
: ${LDFLAGS=""}
|
: ${LDFLAGS=""}
|
||||||
DLDFLAGS="$DLDFLAGS $ARCH_FLAG"
|
|
||||||
rb_cv_dlopen=yes ;;
|
rb_cv_dlopen=yes ;;
|
||||||
aix*) : ${LDSHARED='/usr/ccs/bin/ld'}
|
aix*) : ${LDSHARED='/usr/ccs/bin/ld'}
|
||||||
XLDFLAGS="$XLDFLAGS -Wl,-bE:ruby.imp"
|
XLDFLAGS="$XLDFLAGS -Wl,-bE:ruby.imp"
|
||||||
|
@ -1103,9 +1100,9 @@ if test "$prefix" = NONE; then
|
||||||
prefix=$ac_default_prefix
|
prefix=$ac_default_prefix
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$fat_binary" != no ; then
|
#if test "$fat_binary" != no ; then
|
||||||
CFLAGS="$CFLAGS $ARCH_FLAG"
|
# CFLAGS="$CFLAGS $ARCH_FLAG"
|
||||||
fi
|
#fi
|
||||||
|
|
||||||
if test x"$cross_compiling" = xyes; then
|
if test x"$cross_compiling" = xyes; then
|
||||||
test x"$MINIRUBY" = x && MINIRUBY="${RUBY-ruby} -I`pwd` -rfake"
|
test x"$MINIRUBY" = x && MINIRUBY="${RUBY-ruby} -I`pwd` -rfake"
|
||||||
|
|
|
@ -215,6 +215,7 @@ def link_command(ldflags, opt="", libpath=$LIBPATH)
|
||||||
'INCFLAGS' => $INCFLAGS,
|
'INCFLAGS' => $INCFLAGS,
|
||||||
'CPPFLAGS' => $CPPFLAGS,
|
'CPPFLAGS' => $CPPFLAGS,
|
||||||
'CFLAGS' => "#$CFLAGS",
|
'CFLAGS' => "#$CFLAGS",
|
||||||
|
'ARCH_FLAG' => "#$ARCH_FLAG",
|
||||||
'LDFLAGS' => "#$LDFLAGS #{ldflags}",
|
'LDFLAGS' => "#$LDFLAGS #{ldflags}",
|
||||||
'LIBPATH' => libpathflag(libpath),
|
'LIBPATH' => libpathflag(libpath),
|
||||||
'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs",
|
'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs",
|
||||||
|
@ -223,7 +224,7 @@ end
|
||||||
|
|
||||||
def cc_command(opt="")
|
def cc_command(opt="")
|
||||||
"$(CC) -c #$INCFLAGS -I#{$hdrdir} " \
|
"$(CC) -c #$INCFLAGS -I#{$hdrdir} " \
|
||||||
"#$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C}"
|
"#$CPPFLAGS #$CFLAGS #$ARCH_FLAG #{opt} #{CONFTEST_C}"
|
||||||
end
|
end
|
||||||
|
|
||||||
def cpp_command(outfile, opt="")
|
def cpp_command(outfile, opt="")
|
||||||
|
@ -720,7 +721,7 @@ LIBRUBY_A = #{CONFIG['LIBRUBY_A']}
|
||||||
LIBRUBYARG_SHARED = #$LIBRUBYARG_SHARED
|
LIBRUBYARG_SHARED = #$LIBRUBYARG_SHARED
|
||||||
LIBRUBYARG_STATIC = #$LIBRUBYARG_STATIC
|
LIBRUBYARG_STATIC = #$LIBRUBYARG_STATIC
|
||||||
|
|
||||||
CFLAGS = #{CONFIG['CCDLFLAGS'] unless $static} #$CFLAGS
|
CFLAGS = #{CONFIG['CCDLFLAGS'] unless $static} #$CFLAGS #$ARCH_FLAG
|
||||||
CPPFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) #{$defs.join(" ")} #{$CPPFLAGS}
|
CPPFLAGS = -I. -I$(topdir) -I$(hdrdir) -I$(srcdir) #{$defs.join(" ")} #{$CPPFLAGS}
|
||||||
CXXFLAGS = $(CFLAGS) #{CONFIG['CXXFLAGS']}
|
CXXFLAGS = $(CFLAGS) #{CONFIG['CXXFLAGS']}
|
||||||
DLDFLAGS = #$LDFLAGS #{CONFIG['DLDFLAGS']} #$DLDFLAGS
|
DLDFLAGS = #$LDFLAGS #{CONFIG['DLDFLAGS']} #$DLDFLAGS
|
||||||
|
@ -943,6 +944,7 @@ def init_mkmf(config = CONFIG)
|
||||||
$enable_shared = config['ENABLE_SHARED'] == 'yes'
|
$enable_shared = config['ENABLE_SHARED'] == 'yes'
|
||||||
$defs = []
|
$defs = []
|
||||||
$CFLAGS = with_config("cflags", arg_config("CFLAGS", config["CFLAGS"])).dup
|
$CFLAGS = with_config("cflags", arg_config("CFLAGS", config["CFLAGS"])).dup
|
||||||
|
$ARCH_FLAG = with_config("arch_flag", arg_config("ARCH_FLAG", config["ARCH_FLAG"])).dup
|
||||||
$CPPFLAGS = with_config("cppflags", arg_config("CPPFLAGS", config["CPPFLAGS"])).dup
|
$CPPFLAGS = with_config("cppflags", arg_config("CPPFLAGS", config["CPPFLAGS"])).dup
|
||||||
$LDFLAGS = (with_config("ldflags") || "").dup
|
$LDFLAGS = (with_config("ldflags") || "").dup
|
||||||
$INCFLAGS = "-I#{$topdir}"
|
$INCFLAGS = "-I#{$topdir}"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue