llvm.org GIT mirror llvm / 1aee22e
Replace the old --with-cxx-* configure options with a single --with-gcc-toolchain that just uses the new toolchain probing logic. This fixes linking with -m32 on 64 bit systems (the /32 dir was not being added to the search). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149651 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 7 years ago
7 changed file(s) with 47 addition(s) and 191 deletion(s). Raw diff Collapse all Expand all
832832 AC_DEFINE_UNQUOTED(C_INCLUDE_DIRS,"$withval",
833833 [Directories clang will search for headers])
834834
835 AC_ARG_WITH(cxx-include-root,
836 AS_HELP_STRING([--with-cxx-include-root],
837 [Directory with the libstdc++ headers.]),,
835 # Clang normally uses the system c++ headers and libraries. With this option,
836 # clang will use the ones provided by a gcc installation instead. This option should
837 # be passed the same value that was used with --prefix when configuring gcc.
838 AC_ARG_WITH(gcc-toolchain,
839 AS_HELP_STRING([--with-gcc-toolchain],
840 [Directory where gcc is installed.]),,
838841 withval="")
839 AC_DEFINE_UNQUOTED(CXX_INCLUDE_ROOT,"$withval",
840 [Directory with the libstdc++ headers.])
841
842 AC_ARG_WITH(cxx-include-arch,
843 AS_HELP_STRING([--with-cxx-include-arch],
844 [Architecture of the libstdc++ headers.]),,
845 withval="")
846 AC_DEFINE_UNQUOTED(CXX_INCLUDE_ARCH,"$withval",
847 [Arch the libstdc++ headers.])
848
849 AC_ARG_WITH(cxx-include-32bit-dir,
850 AS_HELP_STRING([--with-cxx-include-32bit-dir],
851 [32 bit multilib dir.]),,
852 withval="")
853 AC_DEFINE_UNQUOTED(CXX_INCLUDE_32BIT_DIR,"$withval",
854 [32 bit multilib directory.])
855
856 AC_ARG_WITH(cxx-include-64bit-dir,
857 AS_HELP_STRING([--with-cxx-include-64bit-dir],
858 [64 bit multilib directory.]),,
859 withval="")
860 AC_DEFINE_UNQUOTED(CXX_INCLUDE_64BIT_DIR,"$withval",
861 [64 bit multilib directory.])
842 AC_DEFINE_UNQUOTED(GCC_INSTALL_PREFIX,"$withval",
843 [Directory where gcc is installed.])
862844
863845 dnl Allow linking of LLVM with GPLv3 binutils code.
864846 AC_ARG_WITH(binutils-include,
14411441 resource files
14421442 --with-c-include-dirs Colon separated list of directories clang will
14431443 search for headers
1444 --with-cxx-include-root Directory with the libstdc++ headers.
1445 --with-cxx-include-arch Architecture of the libstdc++ headers.
1446 --with-cxx-include-32bit-dir
1447 32 bit multilib dir.
1448 --with-cxx-include-64bit-dir
1449 64 bit multilib directory.
1444 --with-gcc-toolchain Directory where gcc is installed.
14501445 --with-binutils-include Specify path to binutils/include/ containing
14511446 plugin-api.h file for gold plugin.
14521447 --with-bug-report-url Specify the URL where bug reports should be
55695564 _ACEOF
55705565
55715566
5572
5573 # Check whether --with-cxx-include-root was given.
5574 if test "${with_cxx_include_root+set}" = set; then
5575 withval=$with_cxx_include_root;
5567 # Clang normally uses the system c++ headers and libraries. With this option,
5568 # clang will use the ones provided by a gcc installation instead. This option should
5569 # be passed the same value that was used with --prefix when configuring gcc.
5570
5571 # Check whether --with-gcc-toolchain was given.
5572 if test "${with_gcc_toolchain+set}" = set; then
5573 withval=$with_gcc_toolchain;
55765574 else
55775575 withval=""
55785576 fi
55795577
55805578
55815579 cat >>confdefs.h <<_ACEOF
5582 #define CXX_INCLUDE_ROOT "$withval"
5583 _ACEOF
5584
5585
5586
5587 # Check whether --with-cxx-include-arch was given.
5588 if test "${with_cxx_include_arch+set}" = set; then
5589 withval=$with_cxx_include_arch;
5590 else
5591 withval=""
5592 fi
5593
5594
5595 cat >>confdefs.h <<_ACEOF
5596 #define CXX_INCLUDE_ARCH "$withval"
5597 _ACEOF
5598
5599
5600
5601 # Check whether --with-cxx-include-32bit-dir was given.
5602 if test "${with_cxx_include_32bit_dir+set}" = set; then
5603 withval=$with_cxx_include_32bit_dir;
5604 else
5605 withval=""
5606 fi
5607
5608
5609 cat >>confdefs.h <<_ACEOF
5610 #define CXX_INCLUDE_32BIT_DIR "$withval"
5611 _ACEOF
5612
5613
5614
5615 # Check whether --with-cxx-include-64bit-dir was given.
5616 if test "${with_cxx_include_64bit_dir+set}" = set; then
5617 withval=$with_cxx_include_64bit_dir;
5618 else
5619 withval=""
5620 fi
5621
5622
5623 cat >>confdefs.h <<_ACEOF
5624 #define CXX_INCLUDE_64BIT_DIR "$withval"
5580 #define GCC_INSTALL_PREFIX "$withval"
56255581 _ACEOF
56265582
56275583
1049610452 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1049710453 lt_status=$lt_dlunknown
1049810454 cat > conftest.$ac_ext <
10499 #line 10500 "configure"
10455 #line 10456 "configure"
1050010456 #include "confdefs.h"
1050110457
1050210458 #if HAVE_DLFCN_H
1010 /* Relative directory for resource files */
1111 #define CLANG_RESOURCE_DIR "${CLANG_RESOURCE_DIR}"
1212
13 /* 32 bit multilib directory. */
14 #define CXX_INCLUDE_32BIT_DIR "${CXX_INCLUDE_32BIT_DIR}"
15
16 /* 64 bit multilib directory. */
17 #define CXX_INCLUDE_64BIT_DIR "${CXX_INCLUDE_64BIT_DIR}"
18
19 /* Arch the libstdc++ headers. */
20 #define CXX_INCLUDE_ARCH "${CXX_INCLUDE_ARCH}"
21
22 /* Directory with the libstdc++ headers. */
23 #define CXX_INCLUDE_ROOT "${CXX_INCLUDE_ROOT}"
13 /* Directory wherelibstdc++ is installed. */
14 #define GCC_INSTALL_PREFIX "${GCC_INSTALL_PREFIX}"
2415
2516 /* Directories clang will search for headers */
2617 #define C_INCLUDE_DIRS "${C_INCLUDE_DIRS}"
88 /* Relative directory for resource files */
99 #undef CLANG_RESOURCE_DIR
1010
11 /* 32 bit multilib directory. */
12 #undef CXX_INCLUDE_32BIT_DIR
13
14 /* 64 bit multilib directory. */
15 #undef CXX_INCLUDE_64BIT_DIR
16
17 /* Arch the libstdc++ headers. */
18 #undef CXX_INCLUDE_ARCH
19
20 /* Directory with the libstdc++ headers. */
21 #undef CXX_INCLUDE_ROOT
22
2311 /* Directories clang will search for headers */
2412 #undef C_INCLUDE_DIRS
2513
3119
3220 /* Define if timestamp information (e.g., __DATE___) is allowed */
3321 #undef ENABLE_TIMESTAMPS
22
23 /* Directory where gcc is installed. */
24 #undef GCC_INSTALL_PREFIX
3425
3526 /* Define to 1 if you have the `argz_append' function. */
3627 #undef HAVE_ARGZ_APPEND
744744 AC_DEFINE_UNQUOTED(C_INCLUDE_DIRS,"$withval",
745745 [Directories clang will search for headers])
746746
747 AC_ARG_WITH(cxx-include-root,
748 AS_HELP_STRING([--with-cxx-include-root],
749 [Directory with the libstdc++ headers.]),,
747 # Clang normally uses the system c++ headers and libraries. With this option,
748 # clang will use the ones provided by a gcc installation instead. This option should
749 # be passed the same value that was used with --prefix when configuring gcc.
750 AC_ARG_WITH(gcc-toolchain,
751 AS_HELP_STRING([--with-gcc-toolchain],
752 [Directory where gcc is installed.]),,
750753 withval="")
751 AC_DEFINE_UNQUOTED(CXX_INCLUDE_ROOT,"$withval",
752 [Directory with the libstdc++ headers.])
753
754 AC_ARG_WITH(cxx-include-arch,
755 AS_HELP_STRING([--with-cxx-include-arch],
756 [Architecture of the libstdc++ headers.]),,
757 withval="")
758 AC_DEFINE_UNQUOTED(CXX_INCLUDE_ARCH,"$withval",
759 [Arch the libstdc++ headers.])
760
761 AC_ARG_WITH(cxx-include-32bit-dir,
762 AS_HELP_STRING([--with-cxx-include-32bit-dir],
763 [32 bit multilib dir.]),,
764 withval="")
765 AC_DEFINE_UNQUOTED(CXX_INCLUDE_32BIT_DIR,"$withval",
766 [32 bit multilib directory.])
767
768 AC_ARG_WITH(cxx-include-64bit-dir,
769 AS_HELP_STRING([--with-cxx-include-64bit-dir],
770 [64 bit multilib directory.]),,
771 withval="")
772 AC_DEFINE_UNQUOTED(CXX_INCLUDE_64BIT_DIR,"$withval",
773 [64 bit multilib directory.])
754 AC_DEFINE_UNQUOTED(GCC_INSTALL_PREFIX,"$withval",
755 [Directory where gcc is installed.])
774756
775757 dnl Allow linking of LLVM with GPLv3 binutils code.
776758 AC_ARG_WITH(binutils-include,
14251425 resource files
14261426 --with-c-include-dirs Colon separated list of directories clang will
14271427 search for headers
1428 --with-cxx-include-root Directory with the libstdc++ headers.
1429 --with-cxx-include-arch Architecture of the libstdc++ headers.
1430 --with-cxx-include-32bit-dir
1431 32 bit multilib dir.
1432 --with-cxx-include-64bit-dir
1433 64 bit multilib directory.
1428 --with-gcc-toolchain Directory where gcc is installed.
14341429 --with-binutils-include Specify path to binutils/include/ containing
14351430 plugin-api.h file for gold plugin.
14361431 --with-bug-report-url Specify the URL where bug reports should be
54925487 _ACEOF
54935488
54945489
5495
5496 # Check whether --with-cxx-include-root was given.
5497 if test "${with_cxx_include_root+set}" = set; then
5498 withval=$with_cxx_include_root;
5490 # Clang normally uses the system c++ headers and libraries. With this option,
5491 # clang will use the ones provided by a gcc installation instead. This option should
5492 # be passed the same value that was used with --prefix when configuring gcc.
5493
5494 # Check whether --with-gcc-toolchain was given.
5495 if test "${with_gcc_toolchain+set}" = set; then
5496 withval=$with_gcc_toolchain;
54995497 else
55005498 withval=""
55015499 fi
55025500
55035501
55045502 cat >>confdefs.h <<_ACEOF
5505 #define CXX_INCLUDE_ROOT "$withval"
5506 _ACEOF
5507
5508
5509
5510 # Check whether --with-cxx-include-arch was given.
5511 if test "${with_cxx_include_arch+set}" = set; then
5512 withval=$with_cxx_include_arch;
5513 else
5514 withval=""
5515 fi
5516
5517
5518 cat >>confdefs.h <<_ACEOF
5519 #define CXX_INCLUDE_ARCH "$withval"
5520 _ACEOF
5521
5522
5523
5524 # Check whether --with-cxx-include-32bit-dir was given.
5525 if test "${with_cxx_include_32bit_dir+set}" = set; then
5526 withval=$with_cxx_include_32bit_dir;
5527 else
5528 withval=""
5529 fi
5530
5531
5532 cat >>confdefs.h <<_ACEOF
5533 #define CXX_INCLUDE_32BIT_DIR "$withval"
5534 _ACEOF
5535
5536
5537
5538 # Check whether --with-cxx-include-64bit-dir was given.
5539 if test "${with_cxx_include_64bit_dir+set}" = set; then
5540 withval=$with_cxx_include_64bit_dir;
5541 else
5542 withval=""
5543 fi
5544
5545
5546 cat >>confdefs.h <<_ACEOF
5547 #define CXX_INCLUDE_64BIT_DIR "$withval"
5503 #define GCC_INSTALL_PREFIX "$withval"
55485504 _ACEOF
55495505
55505506
1040810364 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1040910365 lt_status=$lt_dlunknown
1041010366 cat > conftest.$ac_ext <
10411 #line 10412 "configure"
10367 #line 10368 "configure"
1041210368 #include "confdefs.h"
1041310369
1041410370 #if HAVE_DLFCN_H
346346
347347 # Assume we're building with gcc for now.
348348 cxxincludes = self.get_includes()
349 cxxroot = cxxincludes[0]
350 cxxarch = os.path.basename(cxxincludes[1])
349 cxxroot = os.path.dirname(cxxincludes[0]) # Remove the version
350 cxxroot = os.path.dirname(cxxroot) # Remove the c++
351 cxxroot = os.path.dirname(cxxroot) # Remove the include
351352
352353 configure_flags = dict(
353354 llvm=dict(debug=["--prefix=" + self.install_prefix,
354355 "--with-extra-options=-Werror",
355356 "--enable-assertions",
356357 "--disable-optimized",
357 "--with-cxx-include-root=" + cxxroot,
358 "--with-cxx-include-arch=" + cxxarch],
358 "--with-gcc-toolchain=" + cxxroot],
359359 release=["--prefix=" + self.install_prefix,
360360 "--with-extra-options=-Werror",
361361 "--enable-optimized",
362 "--with-cxx-include-root=" + cxxroot,
363 "--with-cxx-include-arch=" + cxxarch],
362 "--with-gcc-toolchain=" + cxxroot],
364363 paranoid=["--prefix=" + self.install_prefix,
365364 "--with-extra-options=-Werror",
366365 "--enable-assertions",
367366 "--enable-expensive-checks",
368367 "--disable-optimized",
369 "--with-cxx-include-root=" + cxxroot,
370 "--with-cxx-include-arch=" + cxxarch]),
368 "--with-gcc-toolchain=" + cxxroot]),
371369 dragonegg=dict(debug=[],
372370 release=[],
373371 paranoid=[]))