Add mechanism to strip "-m32" and substitute "lib32" into "lib"

for the case of ARM to avoid SHORTARCH flood.
parent 4a1f3a61
......@@ -15,6 +15,7 @@ CREW_CONFIG_PATH = CREW_PREFIX + '/etc/crew/'
CREW_BREW_DIR = CREW_PREFIX + '/tmp/crew/'
CREW_DEST_DIR = CREW_BREW_DIR + '/dest'
ARCH = `uname -m | tr -d '\n\r'`
SHORTARCH = `getconf LONG_BIT | tr -d '\n\r'`
$LOAD_PATH.unshift "#{CREW_LIB_PATH}lib"
......
......@@ -28,6 +28,12 @@ class Package
end
def self.system(*args)
# strip -m32 option and convert lib32 to lib for the case of ARM to avoid SHORTARCH flood
if ARCH == "armv7l"
args = args.map {|s| s.gsub("-m32", "")}
args = args.map {|s| s.gsub("lib32", "lib")}
puts *args
end
Kernel.system(*args)
exitstatus = $?.exitstatus
raise InstallError.new("`#{args.join(" ")}` exited with #{exitstatus}") unless exitstatus == 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment