On 12/10/14 05:22 PM, Anthony G. Basile wrote: > # @FUNCTION: tc-export_build_env > @@ -578,37 +578,37 @@ > gcc-specs-relro() { > local directive > directive=$(gcc-specs-directive link_command) > - return $([[ "${directive/\{!norelro:}" != "${directive}" ]]) > + [[ "${directive/\{!norelro:}" != "${directive}" ]] > } > # Returns true if gcc sets now > gcc-specs-now() { > local directive > directive=$(gcc-specs-directive link_command) > - return $([[ "${directive/\{!nonow:}" != "${directive}" ]]) > + [[ "${directive/\{!nonow:}" != "${directive}" ]] > } > # Returns true if gcc builds PIEs > gcc-specs-pie() { > local directive > directive=$(gcc-specs-directive cc1) > - return $([[ "${directive/\{!nopie:}" != "${directive}" ]]) > + [[ "${directive/\{!nopie:}" != "${directive}" ]] > } > # Returns true if gcc builds with the stack protector > gcc-specs-ssp() { > local directive > directive=$(gcc-specs-directive cc1) > - return $([[ "${directive/\{!fno-stack-protector:}" != > "${directive}" ]]) > + [[ "${directive/\{!fno-stack-protector:}" != "${directive}" ]] > } > # Returns true if gcc upgrades fstack-protector to fstack-protector-all > gcc-specs-ssp-to-all() { > local directive > directive=$(gcc-specs-directive cc1) > - return $([[ "${directive/\{!fno-stack-protector-all:}" != > "${directive}" ]]) > + [[ "${directive/\{!fno-stack-protector-all:}" != "${directive}" ]] > } > # Returns true if gcc builds with fno-strict-overflow > gcc-specs-nostrict() { > local directive > directive=$(gcc-specs-directive cc1) > - return $([[ "${directive/\{!fstrict-overflow:}" != "${directive}" ]]) > + [[ "${directive/\{!fstrict-overflow:}" != "${directive}" ]] > } > > > 2) Then I'll add gcc-specs-stack-check() > > > --- toolchain-funcs.eclass 2014-10-12 17:19:30.086154455 -0400 > +++ /root/toolchain-funcs.eclass 2014-10-12 17:19:05.983153358 -0400 > @@ -610,6 +610,12 @@ > directive=$(gcc-specs-directive cc1) > [[ "${directive/\{!fstrict-overflow:}" != "${directive}" ]] > } > +# Returns true if gcc builds with fstack-check > +gcc-specs-stack-check() { > + local directive > + directive=$(gcc-specs-directive cc1) > + [[ "${directive/\{!fno-stack-check:}" != "${directive}" ]] > +} >
could merge local directive with the next line too while you're at it
signature.asc
Description: OpenPGP digital signature