* [ISSUE] clang9 unsupported flag on xbps-src chroot
@ 2020-03-06 14:22 dinama
2020-03-06 15:27 ` clang-9 unknown argument -fstack-clash-protection " Duncaen
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: dinama @ 2020-03-06 14:22 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 869 bytes --]
New issue by dinama on void-packages repository
https://github.com/void-linux/void-packages/issues/19839
Description:
Can't prepare package which using clang for build because shell `common/environment/configure/hardening.sh` set ` "-fstack-clash-protection -D_FORTIFY_SOURCE=2"` as default CFLAGS.
And compilation broken:
```
FAILED: CMakeFiles/cmTC_a2b73.dir/testCCompiler.c.o
/usr/lib/ccache/bin/clang -fstack-clash-protection -D_FORTIFY_SOURCE=2 \
-mtune=generic -O2 -pipe -o CMakeFiles/cmTC_a2b73.dir/testCCompiler.c.o \
-c testCCompiler.c
clang-9: error: unknown argument: '-fstack-clash-protection'
```
This workaround on <package>/template locally resolve this problem:
```
export CFLAGS=$(sed 's/-fstack-clash-protection//g' <<<$CFLAGS)
export CXXFLAGS=$(sed 's/-fstack-clash-protection//g' <<<$CXXFLAGS)
```
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: clang-9 unknown argument -fstack-clash-protection on xbps-src chroot
2020-03-06 14:22 [ISSUE] clang9 unsupported flag on xbps-src chroot dinama
@ 2020-03-06 15:27 ` Duncaen
2020-03-06 17:19 ` dinama
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Duncaen @ 2020-03-06 15:27 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 266 bytes --]
New comment by Duncaen on void-packages repository
https://github.com/void-linux/void-packages/issues/19839#issuecomment-595818984
Comment:
Something like the following in the template should be fine:
```
export CFLAGS="${CFLAGS/-fstack-clash-protection/}"
```
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: clang-9 unknown argument -fstack-clash-protection on xbps-src chroot
2020-03-06 14:22 [ISSUE] clang9 unsupported flag on xbps-src chroot dinama
2020-03-06 15:27 ` clang-9 unknown argument -fstack-clash-protection " Duncaen
@ 2020-03-06 17:19 ` dinama
2020-03-06 17:23 ` Duncaen
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: dinama @ 2020-03-06 17:19 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 489 bytes --]
New comment by dinama on void-packages repository
https://github.com/void-linux/void-packages/issues/19839#issuecomment-595872036
Comment:
> Something like the following in the template should be fine:
>
> ```
> export CFLAGS="${CFLAGS/-fstack-clash-protection/}"
> ```
yes, now i, using `export CFLAGS=$(sed 's/-fstack-clash-protection//g' <<<$CFLAGS) `
if it workaround is legal for package - then issue notabug
ps. option `-fstack-clash-protection` became in clang11
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: clang-9 unknown argument -fstack-clash-protection on xbps-src chroot
2020-03-06 14:22 [ISSUE] clang9 unsupported flag on xbps-src chroot dinama
2020-03-06 15:27 ` clang-9 unknown argument -fstack-clash-protection " Duncaen
2020-03-06 17:19 ` dinama
@ 2020-03-06 17:23 ` Duncaen
2020-03-06 17:28 ` [ISSUE] [CLOSED] " dinama
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: Duncaen @ 2020-03-06 17:23 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 295 bytes --]
New comment by Duncaen on void-packages repository
https://github.com/void-linux/void-packages/issues/19839#issuecomment-595873586
Comment:
There are a few packages that do something like this, if this is the only way to build it then sure.
But use bash substitutions instead of forking sed.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ISSUE] [CLOSED] clang-9 unknown argument -fstack-clash-protection on xbps-src chroot
2020-03-06 14:22 [ISSUE] clang9 unsupported flag on xbps-src chroot dinama
` (2 preceding siblings ...)
2020-03-06 17:23 ` Duncaen
@ 2020-03-06 17:28 ` dinama
2020-03-06 17:36 ` xtraeme
2021-02-05 3:11 ` [ISSUE] [CLOSED] " ericonr
5 siblings, 0 replies; 7+ messages in thread
From: dinama @ 2020-03-06 17:28 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
Closed issue by dinama on void-packages repository
https://github.com/void-linux/void-packages/issues/19839
Description:
Can't prepare package which using clang for build because shell `common/environment/configure/hardening.sh` set ` "-fstack-clash-protection -D_FORTIFY_SOURCE=2"` as default CFLAGS.
And compilation broken:
```
FAILED: CMakeFiles/cmTC_a2b73.dir/testCCompiler.c.o
/usr/lib/ccache/bin/clang -fstack-clash-protection -D_FORTIFY_SOURCE=2 \
-mtune=generic -O2 -pipe -o CMakeFiles/cmTC_a2b73.dir/testCCompiler.c.o \
-c testCCompiler.c
clang-9: error: unknown argument: '-fstack-clash-protection'
```
This workaround on <package>/template locally resolve this problem:
```
export CFLAGS=$(sed 's/-fstack-clash-protection//g' <<<$CFLAGS)
export CXXFLAGS=$(sed 's/-fstack-clash-protection//g' <<<$CXXFLAGS)
```
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: clang-9 unknown argument -fstack-clash-protection on xbps-src chroot
2020-03-06 14:22 [ISSUE] clang9 unsupported flag on xbps-src chroot dinama
` (3 preceding siblings ...)
2020-03-06 17:28 ` [ISSUE] [CLOSED] " dinama
@ 2020-03-06 17:36 ` xtraeme
2021-02-05 3:11 ` [ISSUE] [CLOSED] " ericonr
5 siblings, 0 replies; 7+ messages in thread
From: xtraeme @ 2020-03-06 17:36 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 212 bytes --]
New comment by xtraeme on void-packages repository
https://github.com/void-linux/void-packages/issues/19839#issuecomment-595879119
Comment:
Hmm not sure if it should be closed. I think I can improve this one.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [ISSUE] [CLOSED] clang-9 unknown argument -fstack-clash-protection on xbps-src chroot
2020-03-06 14:22 [ISSUE] clang9 unsupported flag on xbps-src chroot dinama
` (4 preceding siblings ...)
2020-03-06 17:36 ` xtraeme
@ 2021-02-05 3:11 ` ericonr
5 siblings, 0 replies; 7+ messages in thread
From: ericonr @ 2021-02-05 3:11 UTC (permalink / raw)
To: ml
[-- Attachment #1: Type: text/plain, Size: 872 bytes --]
Closed issue by dinama on void-packages repository
https://github.com/void-linux/void-packages/issues/19839
Description:
Can't prepare package which using clang for build because shell `common/environment/configure/hardening.sh` set ` "-fstack-clash-protection -D_FORTIFY_SOURCE=2"` as default CFLAGS.
And compilation broken:
```
FAILED: CMakeFiles/cmTC_a2b73.dir/testCCompiler.c.o
/usr/lib/ccache/bin/clang -fstack-clash-protection -D_FORTIFY_SOURCE=2 \
-mtune=generic -O2 -pipe -o CMakeFiles/cmTC_a2b73.dir/testCCompiler.c.o \
-c testCCompiler.c
clang-9: error: unknown argument: '-fstack-clash-protection'
```
This workaround on <package>/template locally resolve this problem:
```
export CFLAGS=$(sed 's/-fstack-clash-protection//g' <<<$CFLAGS)
export CXXFLAGS=$(sed 's/-fstack-clash-protection//g' <<<$CXXFLAGS)
```
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2021-02-05 3:11 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-06 14:22 [ISSUE] clang9 unsupported flag on xbps-src chroot dinama
2020-03-06 15:27 ` clang-9 unknown argument -fstack-clash-protection " Duncaen
2020-03-06 17:19 ` dinama
2020-03-06 17:23 ` Duncaen
2020-03-06 17:28 ` [ISSUE] [CLOSED] " dinama
2020-03-06 17:36 ` xtraeme
2021-02-05 3:11 ` [ISSUE] [CLOSED] " ericonr
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).