| Summary: | dev-libs/openssl-1.1.1b.ebuild generates invalid CFLAGS | ||
|---|---|---|---|
| Product: | Gentoo Linux | Reporter: | Slava Sterling <gentoo.org> |
| Component: | Current packages | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | normal | ||
| Priority: | Normal | ||
| Version: | unspecified | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Package list: | Runtime testing required: | --- | |
| Attachments: | Patch to fix sed regex to account for gcc flags that contain dashes | ||
*** This bug has been marked as a duplicate of bug 671016 *** |
Created attachment 566622 [details, diff] Patch to fix sed regex to account for gcc flags that contain dashes Existing ebuild code: # Clean out hardcoded flags that openssl uses # Fix quoting for sed local DEFAULT_CFLAGS=$(grep ^CFLAGS= Makefile | LC_ALL=C sed \ -e 's:^CFLAGS=::' \ -e 's:-fomit-frame-pointer ::g' \ -e 's:-O[0-9] ::g' \ -e 's:-march=[-a-z0-9]* ::g' \ -e 's:-mcpu=[-a-z0-9]* ::g' \ -e 's:-m[a-z0-9]* ::g' \ -e 's:\\:\\\\:g' \ ) Expression 's:-m[a-z0-9]* ::g' doesn't account for flags that themselves contain a dash, e.g. -mno-sha or -mno-clzero, so sed turns them into -mno-mno-sha and -mno-mno-clzero, correspondingly, which breaks compilation with gcc error "unrecognized command line option". Suggested fix: 's:-m[a-z0-9-]* ::g' Patch attached.