From patchwork Mon Nov 19 16:27:35 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: libgo - fix build errors and add ARM bits Date: Mon, 19 Nov 2012 06:27:35 -0000 From: Matthias Klose X-Patchwork-Id: 200042 Message-Id: <50AA5DF7.6020102@ubuntu.com> To: GCC Patches Cc: Ian Lance Taylor libgo-fix-arm.diff: Work around parse error of struct timex_ on ARM (both trunk and 4.7 branch). libgo-hardening.diff: Avoid compiler warnings in libgo with -D_FORTIFY_SOURCE=2, which let the build fail with -Werror. first chunk for the trunk and 4.7, second chunk for trunk only. libgo-mksysinfo.diff: Fix TIOCNOTTY and TIOCSCTTY definitions, afaicr needed for ARM as well. for trunk and 4.7. I did sign the contributors agreement at http://golang.org/doc/contribute.html#copyright, however I didn't get any feedback or acknowledgement yet. Matthias # DP: libgo: Fix TIOCNOTTY and TIOCSCTTY definitions Index: b/src/libgo/mksysinfo.sh =================================================================== --- a/src/libgo/mksysinfo.sh +++ b/src/libgo/mksysinfo.sh @@ -168,6 +168,12 @@ #ifdef TIOCGWINSZ TIOCGWINSZ_val = TIOCGWINSZ, #endif +#ifdef TIOCNOTTY + TIOCNOTTY_val = TIOCNOTTY, +#endif +#ifdef TIOCSCTTY + TIOCSCTTY_val = TIOCSCTTY, +#endif }; EOF @@ -728,6 +734,16 @@ echo 'const TIOCGWINSZ = _TIOCGWINSZ_val' >> ${OUT} fi fi +if ! grep '^const TIOCNOTTY' ${OUT} >/dev/null 2>&1; then + if grep '^const _TIOCNOTTY_val' ${OUT} >/dev/null 2>&1; then + echo 'const TIOCNOTTY = _TIOCNOTTY_val' >> ${OUT} + fi +fi +if ! grep '^const TIOCSCTTY' ${OUT} >/dev/null 2>&1; then + if grep '^const _TIOCSCTTY_val' ${OUT} >/dev/null 2>&1; then + echo 'const TIOCSCTTY = _TIOCSCTTY_val' >> ${OUT} + fi +fi # The ioctl flags for terminal control grep '^const _TC[GS]ET' gen-sysinfo.go | \