• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/gcc/4.9.4/1000-powerpc-link-with-math-lib.patch.conditional
Thomas PetazzoniThomas Petazzoni committed 50c02bd72b103 Aug 2016
Raw file
Source viewDiff to previous
 
1
http://gcc.gnu.org/ml/gcc-patches/2008-10/msg00269.html
2
​
3
On glibc the libc.so carries a copy of the math function copysignl() but
4
on uClibc math functions like copysignl() live in libm. Since libgcc_s
5
contains unresolved symbols, any attempt to link against libgcc_s
6
without explicitely specifying -lm fails, resulting in a broken
7
bootstrap of the compiler.
8
​
9
Forward port to gcc 4.5.1 by Gustavo Zacarias <gustavo@zacarias.com.ar>
10
​
11
---
12
 libgcc/Makefile.in  |    4 +++-
13
 libgcc/configure    |   32 ++++++++++++++++++++++++++++++++
14
 libgcc/configure.ac |   21 +++++++++++++++++++++
15
 3 files changed, 56 insertions(+), 1 deletion(-)
16
​
17
Index: b/libgcc/Makefile.in
18
===================================================================
19
--- a/libgcc/Makefile.in
20
+++ b/libgcc/Makefile.in
21
@@ -42,6 +42,7 @@
22
 enable_vtable_verify = @enable_vtable_verify@
23
 enable_decimal_float = @enable_decimal_float@
24
 fixed_point = @fixed_point@
25
+LIBGCC_LIBM = @LIBGCC_LIBM@
26
 
27
 host_noncanonical = @host_noncanonical@
28
 target_noncanonical = @target_noncanonical@
29
@@ -943,9 +944,10 @@
30
        @multilib_dir@,$(MULTIDIR),$(subst \
31
        @shlib_objs@,$(objects) libgcc.a,$(subst \
32
        @shlib_base_name@,libgcc_s,$(subst \
33
+       @libgcc_libm@,$(LIBGCC_LIBM),$(subst \
34
        @shlib_map_file@,$(mapfile),$(subst \
35
        @shlib_slibdir_qual@,$(MULTIOSSUBDIR),$(subst \
36
-       @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK))))))))
37
+       @shlib_slibdir@,$(shlib_slibdir),$(SHLIB_LINK)))))))))
38
 
39
 libunwind$(SHLIB_EXT): $(libunwind-s-objects) $(extra-parts)
40
    # @multilib_flags@ is still needed because this may use
41
Index: b/libgcc/configure
42
===================================================================
43
--- a/libgcc/configure
44
+++ b/libgcc/configure
45
@@ -564,6 +564,7 @@
46
 tmake_file
47
 sfp_machine_header
48
 set_use_emutls
49
+LIBGCC_LIBM
50
 set_have_cc_tls
51
 vis_hide
52
 fixed_point
53
@@ -4535,6 +4536,37 @@
54
    fi
55
 fi
56
 
57
+# On powerpc libgcc_s references copysignl which is a libm function but
58
+# glibc apparently also provides it via libc as opposed to uClibc where
59
+# it lives in libm.
60
+echo "$as_me:$LINENO: checking for library containing copysignl" >&5
61
+echo $ECHO_N "checking for library containing copysignl... $ECHO_C" >&6
62
+if test "${libgcc_cv_copysignl_lib+set}" = set; then
63
+  echo $ECHO_N "(cached) $ECHO_C" >&6
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.