Cope with compilers that have names other than gcc or clang.
This commit is contained in:
		
							parent
							
								
									491303ecdc
								
							
						
					
					
						commit
						be3639e235
					
				
							
								
								
									
										13
									
								
								tbb.spec
									
									
									
									
									
								
							
							
						
						
									
										13
									
								
								tbb.spec
									
									
									
									
									
								
							| @ -95,8 +95,17 @@ sed -i 's,env python,python3,' python/TBB.py python/tbb/__*.py | |||||||
| sed -i '/^#!/d' python/tbb/{pool,test}.py | sed -i '/^#!/d' python/tbb/{pool,test}.py | ||||||
| 
 | 
 | ||||||
| %build | %build | ||||||
|  | compiler="" | ||||||
|  | if [[ %{__cc} == *"gcc"* ]]; then | ||||||
|  |     compiler="gcc" | ||||||
|  | elif [[ %{__cc} == *"clang"* ]]; then | ||||||
|  |     compiler="clang" | ||||||
|  | else | ||||||
|  |     compiler="%{__cc}" | ||||||
|  | fi | ||||||
|  | 
 | ||||||
| make %{?_smp_mflags} tbb_build_prefix=obj stdver=c++14 \ | make %{?_smp_mflags} tbb_build_prefix=obj stdver=c++14 \ | ||||||
|     compiler=%{__cc} \ |     compiler=${compiler} \ | ||||||
|     CXXFLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \ |     CXXFLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \ | ||||||
|     LDFLAGS="$RPM_LD_FLAGS -lpthread" |     LDFLAGS="$RPM_LD_FLAGS -lpthread" | ||||||
| for file in %{SOURCE6} %{SOURCE7} %{SOURCE8}; do | for file in %{SOURCE6} %{SOURCE7} %{SOURCE8}; do | ||||||
| @ -109,7 +118,7 @@ done | |||||||
| . build/obj_release/tbbvars.sh | . build/obj_release/tbbvars.sh | ||||||
| pushd python | pushd python | ||||||
| make %{?_smp_mflags} -C rml stdver=c++14 \ | make %{?_smp_mflags} -C rml stdver=c++14 \ | ||||||
|     compiler=%{__cc} \ |     compiler=${compiler} \ | ||||||
|     CPLUS_FLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \ |     CPLUS_FLAGS="%{optflags} -DDO_ITT_NOTIFY -DUSE_PTHREAD" \ | ||||||
|     LDFLAGS="$RPM_LD_FLAGS -lpthread" |     LDFLAGS="$RPM_LD_FLAGS -lpthread" | ||||||
| cp -p rml/libirml.so* . | cp -p rml/libirml.so* . | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user