Any interest in Golang patchset for better ARCH flags?

Daniel Santos daniel at gsat.us
Tue Sep 15 02:23:28 EDT 2020


Hello Jeffery,

Thank you for the wonderful work on maintaining the Go packages!

I got a little irritated at CGo's restriction of arch flags (in the
immutable GOGCCFLAGS variable) and put together a patch set for v19.07
to override them with an environment variable and then (optionally) feed
the machine flags in the Golang build.  In the OpenWRT repo, I did this
by splitting out how DEFAULT_CFLAGS are put together in order to
populate a DEFAULT_MACHINE_FLAGS, but it could probably be done with
just a $(filter -m%,$(DEFAULT_CFLAGS)) instead.

If you or others have any interest in this, I can clean them up for the
master branch.  I'm probably going to submit the Golang patch upstream,
since I don't see any good reason for such a restriction.  I see you've
made a lot of changes on the HEAD.

Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Goloang-Add-customizable-ARCH-flags-via-CGO_MACHINE_.patch
Type: text/x-patch
Size: 3484 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20200915/b2d42d6e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-MACHINE_FLAGS-for-use-by-Golang.patch
Type: text/x-patch
Size: 4558 bytes
Desc: not available
URL: <http://lists.openwrt.org/pipermail/openwrt-devel/attachments/20200915/b2d42d6e/attachment-0001.bin>


More information about the openwrt-devel mailing list