Blame 0001-Use-CFLAGS-and-LDFLAGS-specified-in-environment-vari.patch

19d7ebd
From 28f2eece4ab087eb03e54864e59d2f2a8711352e Mon Sep 17 00:00:00 2001
3ca2952
From: Tom Stellard <tstellar@redhat.com>
3ca2952
Date: Mon, 12 Feb 2018 07:56:20 -0800
3ca2952
Subject: [PATCH] Use CFLAGS and LDFLAGS specified in environment variables
3ca2952
3ca2952
---
3ca2952
 CMakeLists.txt | 4 ++--
3ca2952
 1 file changed, 2 insertions(+), 2 deletions(-)
3ca2952
3ca2952
diff --git a/CMakeLists.txt b/CMakeLists.txt
19d7ebd
index 75cac45..b41d789 100644
3ca2952
--- a/CMakeLists.txt
3ca2952
+++ b/CMakeLists.txt
19d7ebd
@@ -59,7 +59,7 @@ set ( BUILD_VERSION_STRING "${BUILD_VERSION_MAJOR}.${BUILD_VERSION_MINOR}.${BUIL
19d7ebd
 #set ( CMAKE_VERBOSE_MAKEFILE on )
3ca2952
 
3ca2952
 ## Compiler flags
19d7ebd
-set ( CMAKE_C_FLAGS "-fPIC -W -Wall -Wextra -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden" )
19d7ebd
+set ( CMAKE_C_FLAGS "-fPIC -W -Wall -Wextra -Wno-unused-parameter -Wformat-security -Wswitch-default -Wundef -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-qual -Wlogical-op -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls -Wunreachable-code -std=gnu99 -fvisibility=hidden $ENV{CFLAGS}" )
19d7ebd
 if ( "${CMAKE_C_COMPILER_VERSION}" STRGREATER "4.8.0")
19d7ebd
     set ( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror" )
19d7ebd
 endif ()
19d7ebd
@@ -73,7 +73,7 @@ endif ()
3ca2952
 set ( HSAKMT_LINKER_SCRIPT "${CMAKE_CURRENT_SOURCE_DIR}/src/libhsakmt.ver" )
3ca2952
 
3ca2952
 ## Linker Flags
19d7ebd
-set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--version-script=${HSAKMT_LINKER_SCRIPT} -Wl,-soname=${HSAKMT_COMPONENT}.so.$(PROJECT_VERSION_MAJOR) -Wl,-z,nodelete -Wl,-no-undefined" )
19d7ebd
+set ( CMAKE_SHARED_LINKER_FLAGS "-Wl,--version-script=${HSAKMT_LINKER_SCRIPT} -Wl,-soname=${HSAKMT_COMPONENT}.so.$(PROJECT_VERSION_MAJOR) -Wl,-z,nodelete -Wl,-no-undefined $ENV{LDFLAGS}" )
3ca2952
 
3ca2952
 ## Source files
19d7ebd
 set ( HSAKMT_SRC "src/debug.c"
3ca2952
-- 
19d7ebd
2.17.0
3ca2952