* [Buildroot] [PATCH 1/1] package/ogre: fix build with RELRO
@ 2020-02-10 17:45 Fabrice Fontaine
2020-04-12 20:49 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Fabrice Fontaine @ 2020-02-10 17:45 UTC (permalink / raw)
To: buildroot
Fixes:
- http://autobuild.buildroot.org/results/b64dfcd8e576666e8a4a52da81a2f5a92b779dc7
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
| 57 +++++++++++++++++++
1 file changed, 57 insertions(+)
create mode 100644 package/ogre/0001-CMake-Utils-PrecompiledHeader.cmake-Add-c-argument-t.patch
--git a/package/ogre/0001-CMake-Utils-PrecompiledHeader.cmake-Add-c-argument-t.patch b/package/ogre/0001-CMake-Utils-PrecompiledHeader.cmake-Add-c-argument-t.patch
new file mode 100644
index 0000000000..0971df2c09
--- /dev/null
+++ b/package/ogre/0001-CMake-Utils-PrecompiledHeader.cmake-Add-c-argument-t.patch
@@ -0,0 +1,57 @@
+From f480ac538eb69086d4b7db855c2a457d5d6420d4 Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Mon, 10 Feb 2020 14:05:12 +0100
+Subject: [PATCH] CMake/Utils/PrecompiledHeader.cmake: Add -c argument to build
+ precompiled headers
+
+Add "-c" argument when building precompiled headers to fix build with
+RELRO.
+
+More information on a similar issue with domoticz can be found here:
+https://patchwork.ozlabs.org/patch/1187328:
+
+"The problem AFAICS is that if no -c or similar option is given, GCC
+decides what needs to be done based on the rest of the arguments. If the
+rest of the arguments include a -Wl,... option, it decides that linking
+needs to be done. If the rest of the arguments are just header files, it
+decides to create a precompiled header."
+
+Fixes:
+ - http://autobuild.buildroot.org/results/8fabf8d270b9257c3a9db6a2f17f1c08ec9428d3
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/OGRECave/ogre/pull/1454]
+---
+ CMake/Utils/PrecompiledHeader.cmake | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/CMake/Utils/PrecompiledHeader.cmake b/CMake/Utils/PrecompiledHeader.cmake
+index a02d99acd..bfb0059db 100644
+--- a/CMake/Utils/PrecompiledHeader.cmake
++++ b/CMake/Utils/PrecompiledHeader.cmake
+@@ -133,11 +133,11 @@ MACRO(_PCH_GET_COMPILE_COMMAND out_command _input _output)
+ STRING(REGEX REPLACE "^ +" "" pchsupport_compiler_cxx_arg1 ${CMAKE_CXX_COMPILER_ARG1})
+
+ SET(${out_command}
+- ${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}
++ ${CMAKE_CXX_COMPILER} ${pchsupport_compiler_cxx_arg1} ${_compile_FLAGS} -x c++-header -c -o ${_output} ${_input}
+ )
+ ELSE(CMAKE_CXX_COMPILER_ARG1)
+ SET(${out_command}
+- ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}
++ ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -c -o ${_output} ${_input}
+ )
+ ENDIF(CMAKE_CXX_COMPILER_ARG1)
+ ELSE(CMAKE_COMPILER_IS_GNUCXX)
+@@ -291,7 +291,7 @@ MACRO(ADD_PRECOMPILED_HEADER _targetName _input)
+ set_target_properties(${_targetName}_pch_dephelp PROPERTIES INCLUDE_DIRECTORIES "${DIRINC}")
+
+ #MESSAGE("_compile_FLAGS: ${_compile_FLAGS}")
+- #message("COMMAND ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -o ${_output} ${_input}")
++ #message("COMMAND ${CMAKE_CXX_COMPILER} ${_compile_FLAGS} -x c++-header -c -o ${_output} ${_input}")
+
+ ADD_CUSTOM_COMMAND(
+ OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/${_name}"
+--
+2.24.1
+
--
2.24.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] package/ogre: fix build with RELRO
2020-02-10 17:45 [Buildroot] [PATCH 1/1] package/ogre: fix build with RELRO Fabrice Fontaine
@ 2020-04-12 20:49 ` Thomas Petazzoni
2020-04-30 12:42 ` Peter Korsgaard
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2020-04-12 20:49 UTC (permalink / raw)
To: buildroot
On Mon, 10 Feb 2020 18:45:11 +0100
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
> Fixes:
> - http://autobuild.buildroot.org/results/b64dfcd8e576666e8a4a52da81a2f5a92b779dc7
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> ...ompiledHeader.cmake-Add-c-argument-t.patch | 57 +++++++++++++++++++
> 1 file changed, 57 insertions(+)
> create mode 100644 package/ogre/0001-CMake-Utils-PrecompiledHeader.cmake-Add-c-argument-t.patch
Applied to master, thanks. Your patch has been merged upstream, on
February 10, and upstream has released a new version 1.12.5 on February
16. There are some chances that bumping to 1.12.5 would allow to drop
this patch.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] package/ogre: fix build with RELRO
2020-04-12 20:49 ` Thomas Petazzoni
@ 2020-04-30 12:42 ` Peter Korsgaard
0 siblings, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2020-04-30 12:42 UTC (permalink / raw)
To: buildroot
>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@bootlin.com> writes:
> On Mon, 10 Feb 2020 18:45:11 +0100
> Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:
>> Fixes:
>> - http://autobuild.buildroot.org/results/b64dfcd8e576666e8a4a52da81a2f5a92b779dc7
>>
>> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
>> ---
>> ...ompiledHeader.cmake-Add-c-argument-t.patch | 57 +++++++++++++++++++
>> 1 file changed, 57 insertions(+)
>> create mode 100644 package/ogre/0001-CMake-Utils-PrecompiledHeader.cmake-Add-c-argument-t.patch
Committed to 2020.02.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-04-30 12:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-10 17:45 [Buildroot] [PATCH 1/1] package/ogre: fix build with RELRO Fabrice Fontaine
2020-04-12 20:49 ` Thomas Petazzoni
2020-04-30 12:42 ` Peter Korsgaard
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.