tinycc-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Missing symbol on Alpine Linux / Musl


From: Steffen Nurpmeso
Subject: Re: [Tinycc-devel] Missing symbol on Alpine Linux / Musl
Date: Fri, 29 Sep 2017 22:15:00 +0200
User-agent: s-nail v14.9.4

i wrote:
 |I thought i provide a tinycc package for Alpine Linux/musl because
 |it is missing there, but from [] as of 2017-09-26 i get "implicit
 |declaration" errors for
 |
 |  '__builtin_va_end'
 |  '__builtin_va_start'
 |  '__builtin_va_arg'
 |
 |This comes from /usr/include/stdarg.h,
 |/usr/lib/tcc/include/stdarg.h is not inspected.

So all is fine if i force /usr/lib/tcc/include into
$C_INCLUDE_PATH, but why isn't that automatic.   Looking
tcc_add_include_path(), and around, and..

  address@hidden nail.git]$ tcc -print-search-dirs
  install: /usr/lib/tcc
  include:
    /usr/lib/tcc/include
    /usr/local/include
    /usr/include
  libraries:
    /usr/lib
    /lib
    /usr/local/lib
  crt:
    /usr/lib
  libtcc1:
    /usr/lib/tcc/libtcc1.a
  elfinterp:
    /lib/ld-musl-x86_64.so.1

But:

  address@hidden nail.git]$ head -n1 /usr/lib/tcc/include/stdarg.h
  #error 1

See

  address@hidden tmp]$ cat t.c
  #include <stdio.h>
  #include <stdarg.h>

  void heu(int argc, ...);
  int main(void){heu(2, "one","two");return 0;}
  void heu(int argc, ...){
          va_list va;
          va_start(vl, argc);
          while(argc-- != 0)
                  fprintf(stderr, "%s\n", va_arg(vl, char const *));
          va_end(vl);
  }
  address@hidden tmp]$ tcc -o zt t.c
  t.c:8: warning: implicit declaration of function '__builtin_va_start'
  t.c:8: error: 'vl' undeclared
  address@hidden tmp]$ C_INCLUDE_PATH=/usr/lib/tcc/include:$C_INCLUDE_PATH tcc 
-o zt t.c
  In file included from t.c:2:
  /usr/lib/tcc/include/stdarg.h:1: error: #error 1

Isn't that strange behaviour?

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]