Skip to contentSkip to conversation

pv: support ccache builds

PATCH New Andrew Ruder 3 participants 3 messages Nov 15, 2013 – Nov 17, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pv: support ccache builds

When using ccache TARGET_CC is something like
ccache gcc

This causes problems in the pv build which attempts to override LD because the command ends up being

    make [...] LD=/tools/ccache /tools/gcc LDFLAGS="[...]

As a result, during the build phase it attempts to build /tools/gcc which succeeds by doing nothing:
make[1]: Nothing to be done for `/tools/gcc'.

and during the install phase you get the real build which errors out on the LD error this snippet was attempting to fix:

    ld -r -o src/library.o src/library/getopt.o \
        src/library/gettext.o
    ld: src/library/gettext.o: Relocations in generic ELF \
        (EM: 40)
    src/library/gettext.o: error adding symbols: File in \
        wrong format
---
 package/pv/pv.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pv/pv.mk +1 -1
index 00502d3..5f1a54b 100644
@@ -17,7 +17,7 @@ PV_LICENSE_FILES = doc/COPYING
 # the correct one. By passing the below values for LD and LDFLAGS, we
 # ensure that 'gcc' is used to do these partial linking steps.
 PV_MAKE_OPT = \
-	LD=$(TARGET_CC) \
+	LD="$(TARGET_CC)" \
 	LDFLAGS="-Wl,-r -nostdlib"
 
 $(eval $(autotools-package))
Signature · 1 line
1.8.4.rc3
#1 lore raw

PATCH 1/1 pv: support ccache builds

Andrew, All,

On 2013-11-15 14:28 -0600, Andrew Ruder spake thusly:

Quoted 14 lines

When using ccache TARGET_CC is something like
ccache gcc

This causes problems in the pv build which attempts to override LD because the command ends up being

    make [...] LD=/tools/ccache /tools/gcc LDFLAGS="[...]

As a result, during the build phase it attempts to build /tools/gcc which succeeds by doing nothing:
make[1]: Nothing to be done for `/tools/gcc'.

and during the install phase you get the real build which errors out on the LD error this snippet was attempting to fix:

Quoted 8 lines
    ld -r -o src/library.o src/library/getopt.o \
        src/library/gettext.o
    ld: src/library/gettext.o: Relocations in generic ELF \
        (EM: 40)
    src/library/gettext.o: error adding symbols: File in \
        wrong format
Quoted 9 lines
---
 package/pv/pv.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
package/pv/pv.mk +0 -0
index 00502d3..5f1a54b 100644

package/pv/pv.mk PV_LICENSE_FILES = doc/COPYING · line 23

Quoted 8 lines
package/pv/pv.mk +1 -1
@@ -17,7 +17,7 @@ PV_LICENSE_FILES = doc/COPYING
 # the correct one. By passing the below values for LD and LDFLAGS, we
 # ensure that 'gcc' is used to do these partial linking steps.
 PV_MAKE_OPT = \
-	LD=$(TARGET_CC) \
+	LD="$(TARGET_CC)" \
 	LDFLAGS="-Wl,-r -nostdlib"
 
 $(eval $(autotools-package))

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#2 lore raw

PATCH 1/1 pv: support ccache builds

In reply to Andrew Ruder
Quoted 16 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Andrew" == Andrew Ruder <[email protected]> writes:

When using ccache TARGET_CC is something like
ccache gcc

This causes problems in the pv build which attempts to override LD because the command ends up being

    make [...] LD=/tools/ccache /tools/gcc LDFLAGS="[...]

As a result, during the build phase it attempts to build /tools/gcc which succeeds by doing nothing:
make[1]: Nothing to be done for `/tools/gcc'.

and during the install phase you get the real build which errors out on the LD error this snippet was attempting to fix:

Quoted 8 lines
    ld -r -o src/library.o src/library/getopt.o \
        src/library/gettext.o
    ld: src/library/gettext.o: Relocations in generic ELF \
        (EM: 40)
    src/library/gettext.o: error adding symbols: File in \
        wrong format

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard