diff options
author | Chan Lee <chan45.lee@samsung.com> | 2016-08-19 12:45:11 +0900 |
---|---|---|
committer | SoonKyu Park <sk7.park@samsung.com> | 2016-09-26 10:37:53 +0900 |
commit | 48a38cf1737911395c5189f8125383f6c6c1ff6c (patch) | |
tree | c88cb4858e5617505b450eabf26d73cea8861059 /Build.pm | |
parent | 1b639d8de7bf62229f4f853d13aae293111bbdf5 (diff) | |
download | build-48a38cf1737911395c5189f8125383f6c6c1ff6c.tar.gz build-48a38cf1737911395c5189f8125383f6c6c1ff6c.tar.bz2 build-48a38cf1737911395c5189f8125383f6c6c1ff6c.zip |
Add hostarch information for build configuration
In a few cases, hostarch information is needed as below,
1. There are some packages to be installed according to host archtecture
2. Some config need to be defined each host archtecture
Change-Id: I3409a1c51069ee60f81b46f06d3f99a74e6df452
Signed-off-by: Chan Lee <chan45.lee@samsung.com>
Diffstat (limited to 'Build.pm')
-rw-r--r-- | Build.pm | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -173,11 +173,18 @@ sub read_config_dist { return $cf; } +sub get_hostarch { + my $hostarch = `uname -m` || 'i586'; + return $hostarch; +} + sub read_config { my ($arch, $cfile) = @_; my @macros = split("\n", $std_macros.$extra_macros); push @macros, "%define _target_cpu $arch"; push @macros, "%define _target_os linux"; + my $hostarch = get_hostarch(); + push @macros, "%define hostarch $hostarch"; my $config = {'macros' => \@macros, 'arch' => $arch}; my @config; if (ref($cfile)) { |