Package: tcc
Version: 0.9.26~git20120104.83d57c0-1
Severity: serious
Tags: patch pending
Justification: Fails to build from source

tcc fails to build from source on armel because it compiles
unconditionally tccasm.c even if inline assembly is not supported for
this architecture (CONFIG_TCC_ASM undefined). The patch is simple,
include a #ifdef CONFIG_TCC_ASM right after the #include <tcc.h> and
#endif at the end of the file.

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (990, 'unstable'), (500, 'stable-updates'), (500, 'testing'), 
(500, 'stable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.1.0-1-amd64 (SMP w/4 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages tcc depends on:
ii  dpkg          1.16.1.2
ii  install-info  4.13a.dfsg.1-8
ii  libc6         2.13-24

Versions of packages tcc recommends:
ii  libc6-dev [libc-dev]  2.13-24

tcc suggests no packages.

-- no debconf information
diff --git a/tccasm.c b/tccasm.c
index 527c006..d1d2af1 100644
--- a/tccasm.c
+++ b/tccasm.c
@@ -19,6 +19,7 @@
  */
 
 #include "tcc.h"
+#ifdef CONFIG_TCC_ASM
 
 ST_FUNC int asm_get_local_label_name(TCCState *s1, unsigned int n)
 {
@@ -1115,3 +1116,4 @@ ST_FUNC void asm_global_instr(void)
 
     cstr_free(&astr);
 }
+#endif /* CONFIG_TCC_ASM */

Reply via email to