View previous topic :: View next topic |
Author |
Message |
gentoo-find n00b
Joined: 07 Apr 2018 Posts: 74
|
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sat Jan 12, 2019 6:44 am Post subject: |
|
|
Add it to your *FLAGS vars in make.conf and emerge -e @world. |
|
Back to top |
|
|
gentoo-find n00b
Joined: 07 Apr 2018 Posts: 74
|
Posted: Sat Jan 12, 2019 10:22 am Post subject: |
|
|
Ant P. wrote: | Add it to your *FLAGS vars in make.conf and emerge -e @world. |
COMMON_FLAGS="-fstack-clash-protection" ? |
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30909 Location: here
|
Posted: Sat Jan 12, 2019 10:26 am Post subject: |
|
|
gentoo-find wrote: | Ant P. wrote: | Add it to your *FLAGS vars in make.conf and emerge -e @world. |
COMMON_FLAGS="-fstack-clash-protection" ? |
I think Ant P. means
Code: | CFLAGS="<your current cflags> -fstack-clash-protection"
CXXFLAGS="${CFLAGS}" |
_________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21631
|
Posted: Sat Jan 12, 2019 5:02 pm Post subject: |
|
|
Also, be sure you use a gcc that understands that option. It appears to be new in 8.x. If you use it in an older version, gcc will reject it and the build will fail. Code: | $ gcc-7.3.0 -x c -o /dev/null /dev/null -c -fstack-clash-protection
gcc-7.3.0: error: unrecognized command line option '-fstack-clash-protection'; did you mean '-fstack-protector'?
$ gcc-8.2.0 -x c -o /dev/null /dev/null -c -fstack-clash-protection
$ |
|
|
Back to top |
|
|
fedeliallalinea Administrator
Joined: 08 Mar 2003 Posts: 30909 Location: here
|
Posted: Sat Jan 12, 2019 9:11 pm Post subject: |
|
|
Hu wrote: | Also, be sure you use a gcc that understands that option. It appears to be new in 8.x. If you use it in an older version, gcc will reject it and the build will fail.] |
Thanks for the tips Hu, I missed this one. _________________ Questions are guaranteed in life; Answers aren't. |
|
Back to top |
|
|
kurly Apprentice
Joined: 02 Apr 2012 Posts: 260
|
Posted: Sat Jan 12, 2019 9:44 pm Post subject: |
|
|
fedeliallalinea wrote: | Hu wrote: | Also, be sure you use a gcc that understands that option. It appears to be new in 8.x. If you use it in an older version, gcc will reject it and the build will fail.] |
Thanks for the tips Hu, I missed this one. |
Should be on already?
Code: | kurly@smile ~ $ LANG=C gcc-8.2.0 -Q --help=common | fgrep stack-clash
-fstack-clash-protection [enabled] |
|
|
Back to top |
|
|
Tom_ Guru
Joined: 20 May 2004 Posts: 444 Location: France
|
Posted: Fri Feb 08, 2019 4:23 pm Post subject: |
|
|
I wonder if any of you has already enabled this flag globally. Does this flag cause compilation issue ? |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Fri Feb 08, 2019 6:49 pm Post subject: |
|
|
Tom_ wrote: | I wonder if any of you has already enabled this flag globally. Does this flag cause compilation issue ? |
Evidently not, if you'd read the post directly above yours you'll see we already all have it enabled. |
|
Back to top |
|
|
Tom_ Guru
Joined: 20 May 2004 Posts: 444 Location: France
|
Posted: Fri Feb 08, 2019 7:13 pm Post subject: |
|
|
Of course I read the post above but I didn't understand it at first. I thought that this command showed gcc capabilities (to show that gcc-8 was required for this flag) but not actual compiler flags. Sorry |
|
Back to top |
|
|
Moonboots Apprentice
Joined: 02 Dec 2006 Posts: 161
|
|
Back to top |
|
|
|