Tizen:Common armv7l build fix 72/21372/1 accepted/tizen_generic tizen_3.0.m14.2_ivi accepted/tizen/common/20140521.164625 accepted/tizen/ivi/20140604.064623 submit/tizen/20140521.090719 tizen_3.0.m14.2_ivi_release
authorVyacheslav Barinov <v.barinov@samsung.com>
Mon, 19 May 2014 10:54:53 +0000 (14:54 +0400)
committerVyacheslav Barinov <v.barinov@samsung.com>
Mon, 19 May 2014 10:54:53 +0000 (14:54 +0400)
The wrong path to gcc libraries failed the build.
Now spec file can detect path to gcc libraries using `gcc -v' command output

Change-Id: Ic5bcdc2be9022396130d77a56ffcf1b81df25642
Signed-off-by: Vyacheslav Barinov <v.barinov@samsung.com>
packaging/gcd.spec

index 9366b68..57d88a6 100644 (file)
@@ -36,14 +36,14 @@ export KQUEUE_LIBS="%{_libdir}"
 export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/BlocksRuntime-0.1"
 export CFLAGS="$CFLAGS -L%{_builddir}/%{name}-%{version}/BlocksRuntime-0.1 -lBlocksRuntime -I%{_builddir}/%{name}-%{version}/BlocksRuntime-0.1 -Xlinker --build-id"
 
+export COMPILER_PATH="%{_libdir}/gcc/$(gcc -v 2>&1 | grep Target | sed -e 's/.*\s//')/$(gcc -v 2>&1 | grep 'gcc version' | sed -e 's/gcc\sversion\s//;s/\.[[:digit:]]\s.*$//')"
+
 %ifarch %{ix86}
 export CC="clang -target i586-tizen-linux"
-export CFLAGS="$CFLAGS -Xlinker -L%{_libdir}/gcc/i586-tizen-linux/%{gcc_version}"
-export COMPILER_PATH=%{_libdir}/gcc/i586-tizen-linux/%{gcc_version}
+export CFLAGS="$CFLAGS -Xlinker -L$COMPILER_PATH"
 %else
 export CC="clang -target %{_target_cpu}-tizen-linux"
-export CFLAGS="$CFLAGS -Xlinker -L%{_libdir}/gcc/%{_target_cpu}-tizen-linux/%{gcc_version}"
-export COMPILER_PATH=%{_libdir}/gcc/%{_target_cpu}-tizen-linux/%{gcc_version}
+export CFLAGS="$CFLAGS -Xlinker -L$COMPILER_PATH"
 %endif
 
 %configure --with-blocks-runtime=%{_libdir}
@@ -85,4 +85,4 @@ done
 %{_includedir}/dispatch/*.h
 %{_libdir}/libdispatch.so
 %{_mandir}/man2/*.gz
-%{_mandir}/man3/*.gz
\ No newline at end of file
+%{_mandir}/man3/*.gz