From d73e77684655181c1148cbd1106f8d4246c0376c Mon Sep 17 00:00:00 2001 From: Vladimir Sokolovsky Date: Tue, 28 Aug 2007 13:48:18 +0300 Subject: [PATCH] Add target_cpu parameter to rpmbuild command. Signed-off-by: Vladimir Sokolovsky --- install.pl | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/install.pl b/install.pl index 7582e0a..57219d8 100755 --- a/install.pl +++ b/install.pl @@ -2018,7 +2018,7 @@ sub resolve_dependencies } for my $module ( @selected_modules_by_user ) { - if ($module eq "ehca" and not -d "$kernel_sources/include/asm-ppc") { + if ($module eq "ehca" and $kernel =~ m/2.6.9-55/ and not -d "$kernel_sources/include/asm-ppc") { print RED "\nTo install ib_ehca module please ensure that $kernel_sources/include/ contains directory asm-ppc.", RESET; print RED "\nPlease install the kernel.src.rpm from redhat and copy the directory and the files into $kernel_sources/include/", RESET; print "\nThen rerun this Script\n"; @@ -2252,6 +2252,7 @@ sub build_rpm if (not $packages_info{$name}{'rpm_exist'}) { $cmd = "rpmbuild --rebuild --define '_topdir $TOPDIR'"; + $cmd .= " --target $target_cpu"; if ( $parent eq "mvapich") { my $compiler = (split('_', $name))[1]; @@ -2525,12 +2526,10 @@ sub build_rpm if ($build32 and $packages_info{$name}{'install32'} and not $packages_info{$name}{'rpm_exist32'}) { $cmd = "rpmbuild --rebuild --define '_topdir $TOPDIR'"; - $cmd .= " --define '_target_cpu $target_cpu32'"; - $cmd .= " --define '_target $target_cpu32-linux'"; + $cmd .= " --target $target_cpu32"; $cmd .= " --define '_prefix $prefix'"; $cmd .= " --define '_lib lib'"; $cmd .= " --define '__arch_install_post %{nil}'"; - $cmd .= " --define 'optflags -O2 -g -m32'"; $cmd .= " $main_packages{$parent}{'srpmpath'}"; print "Running $cmd\n" if ($verbose); -- 2.41.0