-
Notifications
You must be signed in to change notification settings - Fork 18
Remove stack smashing protector for Clang compilers for ruby-builds #12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
modules/RockRuby.cmake
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this option is only understood by gcc-4.9
and later -- I wonder how this crept into the build-environment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On 24.03.2015 15:40, marvin2k wrote:
In modules/RockRuby.cmake
#12 (comment):@@ -266,6 +266,11 @@ ELSEIF(NOT RUBY_EXTENSIONS_AVAILABLE)
OUTPUT_VARIABLE RUBY_CFLAGS)
STRING(REPLACE "\n" "" RUBY_CFLAGS ${RUBY_CFLAGS})
- if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
#Clang can't handle this option (04.2014) remove this flag therefore
STRING(REPLACE "-fstack-protector-strong" "" RUBY_CFLAGS ${RUBY_CFLAGS})
this option is only understood by |gcc-4.9| and later -- I wonder how
this crept into the build-environment?—
Reply to this email directly or view it on GitHub
https://github.com/rock-core/base-cmake/pull/12/files#r27033509.I don't know who injects this. If i calling RBConfig it is present in
the cflags already..
Dipl.-Inf. Matthias Goldhoorn
Space and Underwater Robotic
Universität Bremen
FB 3 - Mathematik und Informatik
AG Robotik
Robert-Hooke-Straße 1
28359 Bremen, Germany
Zentrale: +49 421 178 45-6611
Besuchsadresse der Nebengeschäftstelle:
Robert-Hooke-Straße 5
28359 Bremen, Germany
Tel.: +49 421 178 45-4193
Empfang: +49 421 178 45-6600
Fax: +49 421 178 45-4150
E-Mail: [email protected]
Weitere Informationen: http://www.informatik.uni-bremen.de/robotik
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sidenote: clang-3.4
chokes on the option, while clang-3.5
and later will eat it happily. Maybe your ruby
(and RbConfig
) used/saw a different compiler than you actually use?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that he is on a system where ruby got compiled using gcc and he is using clang
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On 24.03.2015 16:47, Sylvain Joyeux wrote:
In modules/RockRuby.cmake
#12 (comment):@@ -266,6 +266,11 @@ ELSEIF(NOT RUBY_EXTENSIONS_AVAILABLE)
OUTPUT_VARIABLE RUBY_CFLAGS)
STRING(REPLACE "\n" "" RUBY_CFLAGS ${RUBY_CFLAGS})
- if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
#Clang can't handle this option (04.2014) remove this flag therefore
STRING(REPLACE "-fstack-protector-strong" "" RUBY_CFLAGS ${RUBY_CFLAGS})
I guess that he is on a system where ruby got compiled using gcc and
he is using clang—
Reply to this email directly or view it on GitHub
https://github.com/rock-core/base-cmake/pull/12/files#r27040782.This is really possible ;).
Nevertheless how we handle this, in general the EABIs from clang and gcc
are compatible. So i see no reason why we should not workaround this here.
Dipl.-Inf. Matthias Goldhoorn
Space and Underwater Robotic
Universität Bremen
FB 3 - Mathematik und Informatik
AG Robotik
Robert-Hooke-Straße 1
28359 Bremen, Germany
Zentrale: +49 421 178 45-6611
Besuchsadresse der Nebengeschäftstelle:
Robert-Hooke-Straße 5
28359 Bremen, Germany
Tel.: +49 421 178 45-4193
Empfang: +49 421 178 45-6600
Fax: +49 421 178 45-4150
E-Mail: [email protected]
Weitere Informationen: http://www.informatik.uni-bremen.de/robotik
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevertheless how we handle this, in general the EABIs from clang and gcc
are compatible. So i see no reason why we should not workaround this here.
Me neither
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And just disabling the flag is kindof simple. Maybe testing for it is a better idea?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe testing for it is a better idea?
👍
updated |
updated and rebased Tested on debian clang + gcc, assuming clang on macos will behave better now also |
modules/RockRuby.cmake
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's IMO no need to keep the CLang test here. You check if the flag exists or not, that should be enough,
Disable smash-protection only if clang does NOT support it set noexecstack the correct way for clang
There were only one cmake check left (you commented a outdated line) |
pong? |
There's still a question about
protecting the noexecstack thing. Why not test it with a compiler check as well ? |
this wasn't intorduced by me, what should this block do?! On 01.04.2015 14:48, Sylvain Joyeux wrote:
-- Standort Bremen: Phone: +49 (0)421 218-64100 Weitere Informationen: http://www.dfki.de/robotik Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH |
it was there before. I guess it checks whether noexecstack can be applied (somehow), hence my remark about changing it to the new scheme |
updated |
Remove stack smashing protector for Clang compilers for ruby-builds
No description provided.