[Openmp-commits] [openmp] r258843 - Bypass Perl modules in build system
Jonathan Peyton via Openmp-commits
openmp-commits at lists.llvm.org
Tue Jan 26 11:44:32 PST 2016
Author: jlpeyton
Date: Tue Jan 26 13:44:31 2016
New Revision: 258843
URL: http://llvm.org/viewvc/llvm-project?rev=258843&view=rev
Log:
Bypass Perl modules in build system
This change fixes the bug: https://llvm.org/bugs/show_bug.cgi?id=25975
by bypassing the perl module files which try to deduce system information.
These perl modules files don't offer useful information and are from the
original build system. They can be removed after this change.
Modified:
openmp/trunk/runtime/cmake/LibompMicroTests.cmake
openmp/trunk/runtime/cmake/config-ix.cmake
openmp/trunk/runtime/src/CMakeLists.txt
openmp/trunk/runtime/tools/check-depends.pl
openmp/trunk/runtime/tools/check-execstack.pl
openmp/trunk/runtime/tools/check-instruction-set.pl
openmp/trunk/runtime/tools/message-converter.pl
Modified: openmp/trunk/runtime/cmake/LibompMicroTests.cmake
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/cmake/LibompMicroTests.cmake?rev=258843&r1=258842&r2=258843&view=diff
==============================================================================
--- openmp/trunk/runtime/cmake/LibompMicroTests.cmake (original)
+++ openmp/trunk/runtime/cmake/LibompMicroTests.cmake Tue Jan 26 13:44:31 2016
@@ -150,8 +150,8 @@ add_custom_target(libomp-test-execstack
add_custom_command(
OUTPUT test-execstack/.success
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/test-execstack
- COMMAND ${PERL_EXECUTABLE} ${LIBOMP_TOOLS_DIR}/check-execstack.pl --os=${LIBOMP_PERL_SCRIPT_OS}
- --arch=${LIBOMP_ARCH} ${LIBOMP_OUTPUT_DIRECTORY}/${LIBOMP_LIB_FILE}
+ COMMAND ${PERL_EXECUTABLE} ${LIBOMP_TOOLS_DIR}/check-execstack.pl
+ --arch=${LIBOMP_PERL_SCRIPT_ARCH} ${LIBOMP_OUTPUT_DIRECTORY}/${LIBOMP_LIB_FILE}
COMMAND ${CMAKE_COMMAND} -E touch test-execstack/.success
DEPENDS omp
)
@@ -162,7 +162,7 @@ add_custom_command(
OUTPUT test-instr/.success
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/test-instr
COMMAND ${PERL_EXECUTABLE} ${LIBOMP_TOOLS_DIR}/check-instruction-set.pl --os=${LIBOMP_PERL_SCRIPT_OS}
- --arch=${LIBOMP_ARCH} --show --mic-arch=${LIBOMP_MIC_ARCH} ${LIBOMP_OUTPUT_DIRECTORY}/${LIBOMP_LIB_FILE}
+ --arch=${LIBOMP_PERL_SCRIPT_ARCH} --show --mic-arch=${LIBOMP_MIC_ARCH} ${LIBOMP_OUTPUT_DIRECTORY}/${LIBOMP_LIB_FILE}
COMMAND ${CMAKE_COMMAND} -E touch test-instr/.success
DEPENDS omp ${LIBOMP_TOOLS_DIR}/check-instruction-set.pl
)
@@ -219,7 +219,7 @@ add_custom_command(
OUTPUT test-deps/.success
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/test-deps
COMMAND ${PERL_EXECUTABLE} ${LIBOMP_TOOLS_DIR}/check-depends.pl --os=${LIBOMP_PERL_SCRIPT_OS}
- --arch=${LIBOMP_ARCH} --expected="${libomp_expected_library_deps}" ${LIBOMP_OUTPUT_DIRECTORY}/${LIBOMP_LIB_FILE}
+ --arch=${LIBOMP_PERL_SCRIPT_ARCH} --expected="${libomp_expected_library_deps}" ${LIBOMP_OUTPUT_DIRECTORY}/${LIBOMP_LIB_FILE}
COMMAND ${CMAKE_COMMAND} -E touch test-deps/.success
DEPENDS omp ${LIBOMP_TOOLS_DIR}/check-depends.pl
)
Modified: openmp/trunk/runtime/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/cmake/config-ix.cmake?rev=258843&r1=258842&r2=258843&view=diff
==============================================================================
--- openmp/trunk/runtime/cmake/config-ix.cmake (original)
+++ openmp/trunk/runtime/cmake/config-ix.cmake Tue Jan 26 13:44:31 2016
@@ -144,8 +144,8 @@ endif()
# Find perl executable
# Perl is used to create omp.h (and other headers) along with kmp_i18n_id.inc and kmp_i18n_default.inc
find_package(Perl REQUIRED)
-# The perl scripts take the --os= flag which expects a certain format for operating systems. Until the
-# perl scripts are removed, the most portable way to handle this is to have all operating systems that
+# The perl scripts take the --os=/--arch= flags which expect a certain format for operating systems and arch's.
+# Until the perl scripts are removed, the most portable way to handle this is to have all operating systems that
# are neither Windows nor Mac (Most Unix flavors) be considered lin to the perl scripts. This is rooted
# in that all the Perl scripts check the operating system and will fail if it isn't "valid". This
# temporary solution lets us avoid trying to enumerate all the possible OS values inside the Perl modules.
@@ -156,6 +156,15 @@ elseif(APPLE)
else()
set(LIBOMP_PERL_SCRIPT_OS lin)
endif()
+if(IA32)
+ set(LIBOMP_PERL_SCRIPT_ARCH 32)
+elseif(MIC)
+ set(LIBOMP_PERL_SCRIPT_ARCH mic)
+elseif(INTEL64)
+ set(LIBOMP_PERL_SCRIPT_ARCH 32e)
+else()
+ set(LIBOMP_PERL_SCRIPT_ARCH ${LIBOMP_ARCH})
+endif()
# Checking features
# Check if version symbol assembler directives are supported
Modified: openmp/trunk/runtime/src/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/src/CMakeLists.txt?rev=258843&r1=258842&r2=258843&view=diff
==============================================================================
--- openmp/trunk/runtime/src/CMakeLists.txt (original)
+++ openmp/trunk/runtime/src/CMakeLists.txt Tue Jan 26 13:44:31 2016
@@ -20,13 +20,13 @@ endif()
add_custom_command(
OUTPUT kmp_i18n_id.inc
COMMAND ${PERL_EXECUTABLE} ${LIBOMP_TOOLS_DIR}/message-converter.pl --os=${LIBOMP_PERL_SCRIPT_OS}
- --arch=${LIBOMP_ARCH} --prefix=kmp_i18n --enum=kmp_i18n_id.inc ${LIBOMP_SRC_DIR}/i18n/en_US.txt
+ --prefix=kmp_i18n --enum=kmp_i18n_id.inc ${LIBOMP_SRC_DIR}/i18n/en_US.txt
DEPENDS ${LIBOMP_SRC_DIR}/i18n/en_US.txt ${LIBOMP_TOOLS_DIR}/message-converter.pl
)
add_custom_command(
OUTPUT kmp_i18n_default.inc
COMMAND ${PERL_EXECUTABLE} ${LIBOMP_TOOLS_DIR}/message-converter.pl --os=${LIBOMP_PERL_SCRIPT_OS}
- --arch=${LIBOMP_ARCH} --prefix=kmp_i18n --default=kmp_i18n_default.inc ${LIBOMP_SRC_DIR}/i18n/en_US.txt
+ --prefix=kmp_i18n --default=kmp_i18n_default.inc ${LIBOMP_SRC_DIR}/i18n/en_US.txt
DEPENDS ${LIBOMP_SRC_DIR}/i18n/en_US.txt ${LIBOMP_TOOLS_DIR}/message-converter.pl
)
Modified: openmp/trunk/runtime/tools/check-depends.pl
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/tools/check-depends.pl?rev=258843&r1=258842&r2=258843&view=diff
==============================================================================
--- openmp/trunk/runtime/tools/check-depends.pl (original)
+++ openmp/trunk/runtime/tools/check-depends.pl Tue Jan 26 13:44:31 2016
@@ -18,9 +18,10 @@ use FindBin;
use lib "$FindBin::Bin/lib";
use tools;
-use Platform ":vars";
our $VERSION = "0.005";
+my $target_os;
+my $target_arch;
# --------------------------------------------------------------------------------------------------
# Ouput parse error.
@@ -331,7 +332,8 @@ my $expected;
my $bare;
Getopt::Long::Configure( "permute" );
get_options(
- Platform::target_options(),
+ "os=s" => \$target_os,
+ "arch=s" => \$target_arch,
"bare" => \$bare,
"expected=s" => \$expected,
);
Modified: openmp/trunk/runtime/tools/check-execstack.pl
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/tools/check-execstack.pl?rev=258843&r1=258842&r2=258843&view=diff
==============================================================================
--- openmp/trunk/runtime/tools/check-execstack.pl (original)
+++ openmp/trunk/runtime/tools/check-execstack.pl Tue Jan 26 13:44:31 2016
@@ -18,9 +18,9 @@ use FindBin;
use lib "$FindBin::Bin/lib";
use tools;
-use Platform ":vars";
our $VERSION = "0.002";
+my $target_arch;
sub execstack($) {
my ( $file ) = @_;
@@ -56,7 +56,7 @@ sub execstack($) {
}; # sub execstack
get_options(
- Platform::target_options(),
+ "arch=s" => \$target_arch,
);
foreach my $file ( @ARGV ) {
Modified: openmp/trunk/runtime/tools/check-instruction-set.pl
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/tools/check-instruction-set.pl?rev=258843&r1=258842&r2=258843&view=diff
==============================================================================
--- openmp/trunk/runtime/tools/check-instruction-set.pl (original)
+++ openmp/trunk/runtime/tools/check-instruction-set.pl Tue Jan 26 13:44:31 2016
@@ -17,10 +17,12 @@ use warnings;
use FindBin;
use lib "$FindBin::Bin/lib";
-use Platform ":vars";
use tools;
our $VERSION = "0.004";
+my $target_os;
+my $target_arch;
+my $target_mic_arch;
my $hex = qr{[0-9a-f]}i; # hex digit.
@@ -182,17 +184,20 @@ sub check_file($;$$) {
my $max_instructions;
my $show_instructions;
get_options(
+ "os=s" => \$target_os,
+ "arch=s" => \$target_arch,
+ "mic-arch=s" => \$target_mic_arch,
"max-instructions=i" => \$max_instructions,
"show-instructions!" => \$show_instructions,
- Platform::target_options(),
);
+my $target_platform = $target_os . "_" . $target_arch;
if ( "$target_os" eq "lin" and "$target_mic_arch" eq "knf" ) {
$mic_bad_re = qr{^(?:pause|[slm]fence|scatter|gather|cmpxchg16b|clevict[12])}i;
} else {
$mic_bad_re = qr{^(?:pause|[slm]fence|scatter|gather|cmov|cmpxchg16b|clevict[12])}i;
};
if ( 0 ) {
-} elsif ( $target_os eq "lin" and $target_arch eq "mic" ) {
+} elsif ( $target_platform eq "lin_mic" ) {
*bad_instr = \*bad_mic_instr;
*bad_fmt = \*bad_mic_fmt;
} elsif ( $target_platform eq "lin_32" ) {
Modified: openmp/trunk/runtime/tools/message-converter.pl
URL: http://llvm.org/viewvc/llvm-project/openmp/trunk/runtime/tools/message-converter.pl?rev=258843&r1=258842&r2=258843&view=diff
==============================================================================
--- openmp/trunk/runtime/tools/message-converter.pl (original)
+++ openmp/trunk/runtime/tools/message-converter.pl Tue Jan 26 13:44:31 2016
@@ -21,11 +21,11 @@ use FindBin;
use lib "$FindBin::Bin/lib";
use tools;
-use Platform ":vars";
our $VERSION = "0.04";
my $escape = qr{%};
my $placeholder = qr{(\d)\$(s|l?[du])};
+my $target_os;
my $sections =
{
@@ -467,7 +467,7 @@ my $message_file;
my $id;
my $prefix = "";
get_options(
- Platform::target_options(),
+ "os=s" => \$target_os,
"enum-file=s" => \$enum_file,
"signature-file=s" => \$signature_file,
"default-file=s" => \$default_file,
More information about the Openmp-commits
mailing list