1
0
Fork 0
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:
eban 2003-11-30 11:27:34 +00:00
parent 9a8cc1f4ab
commit c3f1c5280b
3 changed files with 21 additions and 11 deletions

View file

@ -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>
* configure.in: do not override CCDLDFLAGS, LDFLAGS, XLDFLAGS,

View file

@ -86,7 +86,7 @@ AC_ARG_ENABLE(fat-binary,
is disabled or omitted entirely, then the package
will be built only for the target platform],
[fat_binary=$enableval], [fat_binary=no])
if test "$fat_binary" != no; then
if test "$fat_binary" != no; then
AC_MSG_CHECKING([target architectures])
@ -125,7 +125,7 @@ AC_ARG_ENABLE(fat-binary,
ARCH_FLAG="$ARCH_FLAG -arch $archs"
done
AC_DEFINE(NEXT_FAT_BINARY)
fi
fi
case $target_cpu in
i?86) frame_address=yes;;
@ -793,6 +793,7 @@ esac
LIBEXT=a
AC_SUBST(DLDFLAGS)dnl
AC_SUBST(ARCH_FLAG)dnl
AC_SUBST(STATIC)dnl
AC_SUBST(CCDLFLAGS)dnl
@ -894,19 +895,15 @@ if test "$with_dln_a_out" != yes; then
rb_cv_dlopen=yes ;;
nextstep*) : ${LDSHARED='cc -r -nostdlib'}
LDFLAGS="$LDFLAGS -u libsys_s"
DLDFLAGS="$DLDFLAGS $ARCH_FLAG"
rb_cv_dlopen=yes ;;
openstep*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress'}
: ${LDFLAGS=""}
DLDFLAGS="$DLDFLAGS $ARCH_FLAG"
rb_cv_dlopen=yes ;;
rhapsody*) : $LDSHARED='cc -dynamic -bundle -undefined suppress'}
: ${LDFLAGS=""}
DLDFLAGS="$DLDFLAGS $ARCH_FLAG"
rb_cv_dlopen=yes ;;
darwin*) : ${LDSHARED='cc -dynamic -bundle -undefined suppress -flat_namespace'}
: ${LDFLAGS=""}
DLDFLAGS="$DLDFLAGS $ARCH_FLAG"
rb_cv_dlopen=yes ;;
aix*) : ${LDSHARED='/usr/ccs/bin/ld'}
XLDFLAGS="$XLDFLAGS -Wl,-bE:ruby.imp"
@ -1103,9 +1100,9 @@ if test "$prefix" = NONE; then
prefix=$ac_default_prefix
fi
if test "$fat_binary" != no ; then
CFLAGS="$CFLAGS $ARCH_FLAG"
fi
#if test "$fat_binary" != no ; then
# CFLAGS="$CFLAGS $ARCH_FLAG"
#fi
if test x"$cross_compiling" = xyes; then
test x"$MINIRUBY" = x && MINIRUBY="${RUBY-ruby} -I`pwd` -rfake"

View file

@ -215,6 +215,7 @@ def link_command(ldflags, opt="", libpath=$LIBPATH)
'INCFLAGS' => $INCFLAGS,
'CPPFLAGS' => $CPPFLAGS,
'CFLAGS' => "#$CFLAGS",
'ARCH_FLAG' => "#$ARCH_FLAG",
'LDFLAGS' => "#$LDFLAGS #{ldflags}",
'LIBPATH' => libpathflag(libpath),
'LOCAL_LIBS' => "#$LOCAL_LIBS #$libs",
@ -223,7 +224,7 @@ end
def cc_command(opt="")
"$(CC) -c #$INCFLAGS -I#{$hdrdir} " \
"#$CPPFLAGS #$CFLAGS #{opt} #{CONFTEST_C}"
"#$CPPFLAGS #$CFLAGS #$ARCH_FLAG #{opt} #{CONFTEST_C}"
end
def cpp_command(outfile, opt="")
@ -720,7 +721,7 @@ LIBRUBY_A = #{CONFIG['LIBRUBY_A']}
LIBRUBYARG_SHARED = #$LIBRUBYARG_SHARED
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}
CXXFLAGS = $(CFLAGS) #{CONFIG['CXXFLAGS']}
DLDFLAGS = #$LDFLAGS #{CONFIG['DLDFLAGS']} #$DLDFLAGS
@ -943,6 +944,7 @@ def init_mkmf(config = CONFIG)
$enable_shared = config['ENABLE_SHARED'] == 'yes'
$defs = []
$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
$LDFLAGS = (with_config("ldflags") || "").dup
$INCFLAGS = "-I#{$topdir}"