summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorTyler Veness2017-03-30 00:42:18 -0700
committerTyler Veness2017-03-30 00:42:18 -0700
commit4d199725c810d327e3aa2a58b2a894c6abc0efcd (patch)
treec4197d3746db9161f718e062603ae6a5febf5070
parentb21d4ed9c54674e856f2ffe8ed4013cc6a8670b3 (diff)
downloadaur-frcmake-git.tar.gz
Fixed CMake toolchain file not honoring includes() directive
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD4
-rw-r--r--toolchain-cmake.patch25
3 files changed, 23 insertions, 10 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 752e4298ac90..16b36657d866 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = frcmake-git
pkgdesc = Some CMake stuff for use with the VxWorks 6.3 GCC Toolchain
pkgver = 46.c66f929
- pkgrel = 4
+ pkgrel = 5
url = http://firstforge.wpi.edu/sf/projects/c--11_toochain
arch = any
license = GPL
@@ -15,7 +15,7 @@ pkgbase = frcmake-git
source = git+http://bitbucket.org/frc-cpp11/frcmake
source = toolchain-cmake.patch
sha512sums = SKIP
- sha512sums = b8c1ed21eab5af8b04f17ae8699e6c5ccdb99eff943e42e2ff2a5f3baf4b157e2426e3677f5086ff1694b713fdb945fc3e21b88cb5e5b2ed65274726433f3972
+ sha512sums = 81c857782abb69c41375e3e4e82394b026ca6e1d66b3206906741ba16777e6d937a086cfd5c93d813b086a49bb452075bd1fcb5b36da082955b5df9f1c2a9851
pkgname = frcmake-git
diff --git a/PKGBUILD b/PKGBUILD
index d0c2f7dabe69..d5c10f308338 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,7 +3,7 @@
pkgname=frcmake-git
pkgver=46.c66f929
-pkgrel=4
+pkgrel=5
pkgdesc="Some CMake stuff for use with the VxWorks 6.3 GCC Toolchain"
arch=(any)
provides=('frcmake')
@@ -15,7 +15,7 @@ options=('!strip' 'libtool' '!zipman')
source=("git+http://bitbucket.org/frc-cpp11/frcmake"
"toolchain-cmake.patch")
sha512sums=('SKIP'
- 'b8c1ed21eab5af8b04f17ae8699e6c5ccdb99eff943e42e2ff2a5f3baf4b157e2426e3677f5086ff1694b713fdb945fc3e21b88cb5e5b2ed65274726433f3972')
+ '81c857782abb69c41375e3e4e82394b026ca6e1d66b3206906741ba16777e6d937a086cfd5c93d813b086a49bb452075bd1fcb5b36da082955b5df9f1c2a9851')
pkgver() {
cd "${srcdir}/frcmake"
diff --git a/toolchain-cmake.patch b/toolchain-cmake.patch
index 0270d3cea6c9..e4453843ae35 100644
--- a/toolchain-cmake.patch
+++ b/toolchain-cmake.patch
@@ -1,5 +1,5 @@
diff --git a/toolchain.cmake.in b/toolchain.cmake.in
-index a913671..32aa4d8 100644
+index a913671..cb36e3b 100644
--- a/toolchain.cmake.in
+++ b/toolchain.cmake.in
@@ -9,49 +9,40 @@ include(CMakeForceCompiler)
@@ -62,7 +62,7 @@ index a913671..32aa4d8 100644
+set(VXWORKS_LIBSUPCXX "/usr/${TARGET}/lib/libsupc++.a")
+#libgcc's location changes based on gcc, so ask compiler where it is
+ execute_process(COMMAND "${TARGET}-gcc" -print-libgcc-file-name OUTPUT_VARIABLE VXWORKS_LIBGCC)
-+
++
+ #the above command leaves a newline at the end of VXWORKS_LIBGCC.
+ #This triggers a bug in cmake's link script execution which will
+ #segfault because it sees a blank line and passes an empty string to
@@ -101,7 +101,17 @@ index a913671..32aa4d8 100644
#Set CFLAGS, LDFLAGS
#Note that we use -nostdlib and then link with the standard library
set(VXWORKS_COMPILE_FLAGS "${ARCH_SPEC} -nostdlib -Wall ${SYSTEM_INCLUDES} -DCPU=${CPU} -DTOOL_FAMILY=${TOOL_FAMILY} -DTOOL=${TOOL} -D_WRS_KERNEL")
-@@ -105,25 +85,6 @@ set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LI
+@@ -97,33 +77,14 @@ set(VXWORKS_DKM_LINK_FLAGS "-nostdlib -r -Wl,-X -static") #should be equivalent
+ set(VXWORKS_DKM_LINK_SCRIPT_FLAG "-T \"${DKM_LINK_SCRIPT}\"")
+
+ #Set toolchain definitions
+-set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> -c <SOURCE> -o <OBJECT> <FLAGS> ${VXWORKS_COMPILE_FLAGS}")
+-set(CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> -c <SOURCE> -o <OBJECT> <FLAGS> ${VXWORKS_COMPILE_FLAGS}")
++set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> -c <SOURCE> -o <OBJECT> <FLAGS> ${VXWORKS_COMPILE_FLAGS}")
++set(CMAKE_CXX_COMPILE_OBJECT "<CMAKE_CXX_COMPILER> <DEFINES> <INCLUDES> -c <SOURCE> -o <OBJECT> <FLAGS> ${VXWORKS_COMPILE_FLAGS}")
+ set(CMAKE_C_CREATE_STATIC_LIBRARY "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>" "<CMAKE_RANLIB> <TARGET>")
+ set(CMAKE_CXX_CREATE_STATIC_LIBRARY "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>" "<CMAKE_RANLIB> <TARGET>")
+ set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> ${VXWORKS_DKM_LINK_FLAGS} ${VXWORKS_DKM_LINK_SCRIPT_FLAG}")
#link rules for C++:
#TODO: This will NOT work on win32!
@@ -127,9 +137,12 @@ index a913671..32aa4d8 100644
# Here's the crazy part...
# - The first line compiles the partial image - NOTE: notice we also link the standard library at this point
# - We munch the executable, which now contains the standard library as well
-@@ -138,12 +99,11 @@ else()
+@@ -136,14 +97,13 @@ else()
+ #
+ # NOTE: We need to link in our own standard library, both to get its features and because there might be some conflicts
# in what symbols are defined, inline functions, and other internals between the kernel's stdlib (which is a whole
- # major version old!) and the one we have. Even if its just the headers, something might break. The gccdist link
+-# major version old!) and the one we have. Even if its just the headers, something might break. The gccdist link
++# major version old!) and the one we have. Even if its just the headers, something might break. The gccdist link
# command might work, but I don't recommend it.
- set(CMAKE_CXX_LINK_EXECUTABLE
- "<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> ${VXWORKS_DKM_LINK_FLAGS} <LINK_FLAGS> <OBJECTS> -o <TARGET>_PartialImage.out <LINK_LIBRARIES> ${VXWORKS_STDLIB_LINK}"
@@ -140,7 +153,7 @@ index a913671..32aa4d8 100644
- "<CMAKE_COMMAND> -E remove <TARGET>_PartialImage.out <TARGET>_ctdt.c <TARGET>_ctdt.c.o"
- )
-endif()
-+set(CMAKE_CXX_LINK_EXECUTABLE
++set(CMAKE_CXX_LINK_EXECUTABLE
+ "<CMAKE_CXX_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> ${VXWORKS_DKM_LINK_FLAGS} <LINK_FLAGS> <OBJECTS> -o <TARGET>_PartialImage.out <LINK_LIBRARIES> ${VXWORKS_STDLIB_LINK}"
+ "${MUNCH} <TARGET>_ctdt.c <TARGET>_PartialImage.out"
+ "<CMAKE_C_COMPILER> -c <TARGET>_ctdt.c -o <TARGET>_ctdt.c.o ${VXWORKS_COMPILE_FLAGS}"