-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed flag selection misfire via CC (vs CC_VENDOR).
Details: - Fixed an issue (#27) where providing a compiler path via the CC environment variable resulted in configure being unable to select appropriate OpenMP flags (pursuant to --enable-multithreading=openmp). (It may be that this affected submission of compilers via the --with-cc option as well.) The problem was traced to the fact that the conditional branches that handled not only OpenMP flag selection but also selection for optimization, warning, preprocessor, and other kinds of flags were using CC instead of something like CC_VENDOR (which was only recently introduced). Obviously, configure cannot predict all of the various ways/paths of requesting gcc (and other compilers), and thus it must compare against a standardized variable such as CC_VENDOR instead. Thanks to Phuong Nguyen for reporting this issue. - Changed all branching on $CC to use ${CC_VENDOR} instead. - Spun off the querying of CC_VENDOR into a separate autoconf macro file, fla_require_cc_vendor.m4.
- Loading branch information
Showing
12 changed files
with
87 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
AC_DEFUN([FLA_REQUIRE_CC_VENDOR], | ||
[ | ||
AC_REQUIRE([FLA_REQUIRE_CC]) | ||
dnl Ascertain the compiler "vendor". | ||
CC_VENDOR=$(echo "$CC" | egrep -o 'icc|gcc|clang|emcc|pnacl|IBM' | { read first rest ; echo $first ; }) | ||
if test "${CC_VENDOR}" = "" ; then | ||
AC_MSG_ERROR([configure can't determine the compiler vendor for $CC. Please submit a bug report to the FLAME developers.]) | ||
else | ||
AC_MSG_NOTICE([[setting the CC_VENDOR environment variable to ${CC_VENDOR}.]]) | ||
fi | ||
dnl Substitute the user-defined CFLAGS into the autoconf output files. | ||
AC_SUBST(CC_VENDOR) | ||
]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.