Martin Roth has uploaded this change for review. ( https://review.coreboot.org/28363
Change subject: util/crossgcc: Update fls function name for binutils nds32 patch ......................................................................
util/crossgcc: Update fls function name for binutils nds32 patch
When building the toolchain in FreeBSD, the function fls conflicts with the native fls function. Just rename this one since it's only used within the single file in the patch.
Change-Id: Iff2019bf4fce2e07e4f78605411bb3fc4f324de7 Signed-off-by: Martin Roth martinr@coreboot.org --- M util/crossgcc/patches/binutils-2.30_nds32.patch 1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/28363/1
diff --git a/util/crossgcc/patches/binutils-2.30_nds32.patch b/util/crossgcc/patches/binutils-2.30_nds32.patch index 9608265..88252c4 100644 --- a/util/crossgcc/patches/binutils-2.30_nds32.patch +++ b/util/crossgcc/patches/binutils-2.30_nds32.patch @@ -5839,7 +5839,7 @@ +} + +static unsigned int -+fls (register unsigned int x) ++fls_ (register unsigned int x) +{ + return ffs (x & (-x)); +} @@ -6698,14 +6698,14 @@ - break; + if (1 < ones32 (tls_type)) + { -+ eff_tls_type = 1 << (fls (tls_type) - 1); ++ eff_tls_type = 1 << (fls_ (tls_type) - 1); + /* TLS model shall be handled in nds32_elf_unify_tls_model () */ + + /* TLS model X -> LE is not implement yet! + * workaround here! */ + if (eff_tls_type == GOT_TLS_LE) + { -+ eff_tls_type = 1 << (fls (tls_type ^ eff_tls_type) - 1); ++ eff_tls_type = 1 << (fls_ (tls_type ^ eff_tls_type) - 1); + } + }
@@ -11865,7 +11865,7 @@ } - irel_ptr = irel_ptr->next; + -+ eff_tls_type = 1 << (fls (tls_type) - 1); ++ eff_tls_type = 1 << (fls_ (tls_type) - 1); + sethi_rt = N32_RT5(bfd_getb32 (contents + irel->r_offset)); }