From 0b3c262b0eee0ed7b813dfda9844dae6fdb350bc Mon Sep 17 00:00:00 2001 From: RC8_221 Date: Thu, 12 Sep 2013 14:02:22 +0900 Subject: [PATCH] fixed build error Change-Id: I576da847691950bb0953b38e1e2bd74d99c3ef85 Signed-off-by: moochang.kim --- dispatch-1.0/dispatch/dispatch.h | 6 ++++++ packaging/gcd.spec | 26 ++++++++++++-------------- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/dispatch-1.0/dispatch/dispatch.h b/dispatch-1.0/dispatch/dispatch.h index b9cee61..4a59eae 100644 --- a/dispatch-1.0/dispatch/dispatch.h +++ b/dispatch-1.0/dispatch/dispatch.h @@ -33,7 +33,13 @@ #include #include #if HAVE_UNISTD_H +#ifdef __BLOCKS__ +#undef __block +#endif #include +#ifdef __BLOCKS__ +#define __block __attribute__((__blocks__(byref))) +#endif #endif #if defined(__cplusplus) diff --git a/packaging/gcd.spec b/packaging/gcd.spec index ce90c91..ad2b3fa 100644 --- a/packaging/gcd.spec +++ b/packaging/gcd.spec @@ -2,12 +2,10 @@ Name: gcd Summary: GCD(Grand Central Dispatch) library Version: 1.0 Release: 1 -License: Apache License, Version 2.0 and BSD -Vendor: AUTHOR -Group: System Environment/Libraries +License: Apache-2.0 and BSD-2-Clause +Group: System/Libraries Source0: %{name}-%{version}.tar.gz -BuildRoot: %{_tmppath}/%{name}-%{version}-build -Provides: libdispatch.so.0 libkqueue.so.0 libBlocksRuntime.so.0 libpthread_workqueue.so.0 +#Provides: libdispatch.so.0 libkqueue.so.0 libBlocksRuntime.so.0 libpthread_workqueue.so.0 BuildRequires: clang @@ -15,8 +13,8 @@ BuildRequires: clang GCD(Grand Central Dispatch) library. %package devel -Summary: GCD(Grand Central Dispatch) library. -Group: TO_BE/FILLED_IN +Summary: GCD(Grand Central Dispatch) library +Group: System/Libraries Requires: %{name} = %{version}-%{release} %description devel @@ -27,7 +25,7 @@ GCD(Grand Central Dispatch) library. (DEV) %build -export GCCVER=$(LANG=C gcc --version | head -1 | sed 's/\([a-z+]*\) \((.*)\) \([1-9\.]*\)\(.*\)/\3/') +export GCCVER=$(LANG=C gcc --version | head -1 | sed 's/\([a-z+]*\) \((.*)\) \([0-9\.]*\)\(.*\)/\3/') cd kqueue-1.0.4 ./configure --prefix=/usr @@ -48,13 +46,13 @@ export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:%{_builddir}/%{name}-%{version}/BlocksR export CFLAGS="$CFLAGS -L%{_builddir}/%{name}-%{version}/BlocksRuntime-0.1 -lBlocksRuntime -I%{_builddir}/%{name}-%{version}/BlocksRuntime-0.1 -Xlinker --build-id" %ifarch %{ix86} -export CC="clang -target i386-tizen-linux-gnueabi" -export CFLAGS="$CFLAGS -Xlinker -L/usr/lib/gcc/i586-tizen-linux/$GCCVER" -export COMPILER_PATH=/usr/lib/gcc/i586-tizen-linux/$GCCVER +export CC="clang -target i586-tizen-linux" +export CFLAGS="$CFLAGS -Xlinker -L/usr/lib/gcc/i586-tizen-linux/4.8" +export COMPILER_PATH=/usr/lib/gcc/i586-tizen-linux/4.8 %else -export CC="clang -target arm-tizen-linux-gnueabi" -export CFLAGS="$CFLAGS -Xlinker -L/usr/lib/gcc/armv7l-tizen-linux-gnueabi/$GCCVER" -export COMPILER_PATH=/usr/lib/gcc/armv7l-tizen-linux-gnueabi/$GCCVER +export CC="clang -target %{_target_cpu}-tizen-linux-gnueabi" +export CFLAGS="$CFLAGS -Xlinker -L/usr/lib/gcc/%{_target_cpu}-tizen-linux-gnueabi/4.8" +export COMPILER_PATH=/usr/lib/gcc/%{_target_cpu}-tizen-linux-gnueabi/4.8 %endif ./configure --with-blocks-runtime=/usr/lib --prefix=/usr -- 2.7.4