File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change 77# Copyright (c) 2013-2014 Intel, Inc. All rights reserved.
88# Copyright (c) 2015 Research Organization for Information Science
99# and Technology (RIST). All rights reserved.
10+ # Copyright (c) 2015 IBM Corporation. All rights reserved.
11+ #
1012# $COPYRIGHT$
1113#
1214# Additional copyrights may follow
@@ -980,6 +982,19 @@ sub patch_autotools_output {
980982 push (@verbose_out , $indent_str . " Patching configure for IBM xlf libtool bug\n " );
981983 $c =~ s / (\$ LD -shared \$ libobjs \$ deplibs \$ )compiler_flags( -soname \$ soname)/ $1linker_flags$2 / g ;
982984
985+ # Check if we are using a recent enough libtool that supports PowerPC little endian
986+ if (index ($c , ' powerpc64le-*linux*)' ) == -1) {
987+ push (@verbose_out , $indent_str . " Patching configure for PowerPC little endian support\n " );
988+ my $replace_string = " x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*|" ;
989+ $c =~ s / x86_64-\* kfreebsd\* -gnu\| x86_64-\* linux\*\| ppc\* -\* linux\*\| powerpc\* -\* linux\*\| / $replace_string / g ;
990+ $replace_string =
991+ " powerpc64le-*linux*)\n\t LD=\"\$ {LD-ld} -m elf32lppclinux\"\n\t ;;\n\t powerpc64-*linux*)" ;
992+ $c =~ s / ppc64-\* linux\*\| powerpc64-\* linux\*\) / $replace_string / g ;
993+ $replace_string =
994+ " powerpcle-*linux*)\n\t LD=\"\$ {LD-ld} -m elf64lppc\"\n\t ;;\n\t powerpc-*linux*)" ;
995+ $c =~ s / ppc\* -\* linux\*\| powerpc\* -\* linux\*\) / $replace_string / g ;
996+ }
997+
983998 # Fix consequence of broken libtool.m4
984999 # see http://lists.gnu.org/archive/html/bug-libtool/2015-07/msg00002.html and
9851000 # https://github.com/open-mpi/ompi/issues/751
You can’t perform that action at this time.
0 commit comments