224
225 AC_SUBST($1SYSROOT_CFLAGS)
226 AC_SUBST($1SYSROOT_LDFLAGS)
227 ])
228
229 AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
230 [
231 # We should always include user supplied flags
232 FLAGS_SETUP_USER_SUPPLIED_FLAGS
233 # The sysroot flags are needed for configure to be able to run the compilers
234 FLAGS_SETUP_SYSROOT_FLAGS
235
236 # For solstudio and xlc, the word size flag is required for correct behavior.
237 # For clang/gcc, the flag is only strictly required for reduced builds, but
238 # set it always where possible (x86, sparc and ppc).
239 if test "x$TOOLCHAIN_TYPE" = xxlc; then
240 MACHINE_FLAG="-q${OPENJDK_TARGET_CPU_BITS}"
241 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
242 MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
243 elif test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
244 if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86 ||
245 test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc ||
246 test "x$OPENJDK_TARGET_CPU_ARCH" = xppc; then
247 MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
248 fi
249 fi
250
251 # FIXME: global flags are not used yet...
252 # The "global" flags will *always* be set. Without them, it is not possible to
253 # get a working compilation.
254 GLOBAL_CFLAGS="$MACHINE_FLAG $SYSROOT_CFLAGS $USER_CFLAGS"
255 GLOBAL_CXXFLAGS="$MACHINE_FLAG $SYSROOT_CFLAGS $USER_CXXFLAGS"
256 GLOBAL_LDFLAGS="$MACHINE_FLAG $SYSROOT_LDFLAGS $USER_LDFLAGS"
257 # FIXME: Don't really know how to do with this, but this was the old behavior
258 GLOBAL_CPPFLAGS="$SYSROOT_CFLAGS"
259 AC_SUBST(GLOBAL_CFLAGS)
260 AC_SUBST(GLOBAL_CXXFLAGS)
261 AC_SUBST(GLOBAL_LDFLAGS)
262 AC_SUBST(GLOBAL_CPPFLAGS)
263
264 # FIXME: For compatilibity, export this as EXTRA_CFLAGS for now.
|
224
225 AC_SUBST($1SYSROOT_CFLAGS)
226 AC_SUBST($1SYSROOT_LDFLAGS)
227 ])
228
229 AC_DEFUN_ONCE([FLAGS_PRE_TOOLCHAIN],
230 [
231 # We should always include user supplied flags
232 FLAGS_SETUP_USER_SUPPLIED_FLAGS
233 # The sysroot flags are needed for configure to be able to run the compilers
234 FLAGS_SETUP_SYSROOT_FLAGS
235
236 # For solstudio and xlc, the word size flag is required for correct behavior.
237 # For clang/gcc, the flag is only strictly required for reduced builds, but
238 # set it always where possible (x86, sparc and ppc).
239 if test "x$TOOLCHAIN_TYPE" = xxlc; then
240 MACHINE_FLAG="-q${OPENJDK_TARGET_CPU_BITS}"
241 elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
242 MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
243 elif test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
244 if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86 &&
245 test "x$OPENJDK_TARGET_CPU" != xx32 ||
246 test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc ||
247 test "x$OPENJDK_TARGET_CPU_ARCH" = xppc; then
248 MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
249 fi
250 fi
251
252 # FIXME: global flags are not used yet...
253 # The "global" flags will *always* be set. Without them, it is not possible to
254 # get a working compilation.
255 GLOBAL_CFLAGS="$MACHINE_FLAG $SYSROOT_CFLAGS $USER_CFLAGS"
256 GLOBAL_CXXFLAGS="$MACHINE_FLAG $SYSROOT_CFLAGS $USER_CXXFLAGS"
257 GLOBAL_LDFLAGS="$MACHINE_FLAG $SYSROOT_LDFLAGS $USER_LDFLAGS"
258 # FIXME: Don't really know how to do with this, but this was the old behavior
259 GLOBAL_CPPFLAGS="$SYSROOT_CFLAGS"
260 AC_SUBST(GLOBAL_CFLAGS)
261 AC_SUBST(GLOBAL_CXXFLAGS)
262 AC_SUBST(GLOBAL_LDFLAGS)
263 AC_SUBST(GLOBAL_CPPFLAGS)
264
265 # FIXME: For compatilibity, export this as EXTRA_CFLAGS for now.
|