Skip to content

Conversation

goldhoorn
Copy link
Contributor

No description provided.

Copy link
Contributor

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?

Copy link
Contributor Author

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

Copy link
Contributor

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?

Copy link
Member

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

Copy link
Contributor Author

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

Copy link
Member

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

Copy link
Contributor

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?

Copy link
Member

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?

👍

@goldhoorn
Copy link
Contributor Author

updated

@goldhoorn
Copy link
Contributor Author

updated and rebased

Tested on debian clang + gcc, assuming clang on macos will behave better now also

Copy link
Member

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
@goldhoorn
Copy link
Contributor Author

There were only one cmake check left (you commented a outdated line)
I removed the last clang compiler check.

Regarding your last comment, i assume the gcc eats the -z and passes it automatically to the linker...

@goldhoorn
Copy link
Contributor Author

pong?

@doudou
Copy link
Member

doudou commented Apr 1, 2015

There's still a question about

IF("${ARCH}" STREQUAL "")

protecting the noexecstack thing. Why not test it with a compiler check as well ?

@goldhoorn
Copy link
Contributor Author

this wasn't intorduced by me, what should this block do?!

On 01.04.2015 14:48, Sylvain Joyeux wrote:

There's still a question about

|IF("${ARCH}" STREQUAL "")
|

protecting the noexecstack thing. Why not test it with a compiler
check as well ?


Reply to this email directly or view it on GitHub
#12 (comment).

--
Matthias Goldhoorn
Unterwasserrobotik

Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Straße 5
28359 Bremen, Germany

Phone: +49 (0)421 218-64100
Fax: +49 (0)421 218-64150
E-Mail: [email protected]

Weitere Informationen: http://www.dfki.de/robotik


Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Straße 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3


@doudou
Copy link
Member

doudou commented Apr 1, 2015

it was there before. I guess it checks whether noexecstack can be applied (somehow), hence my remark about changing it to the new scheme

@goldhoorn
Copy link
Contributor Author

updated

doudou added a commit that referenced this pull request Apr 17, 2015
Remove stack smashing protector for Clang compilers for ruby-builds
@doudou doudou merged commit 1b431e7 into rock-core:master Apr 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants