changeset 503:4a27c24f8283

Update the rest of the files to build with the new make script.
author Rob Landley <rob@landley.net>
date Tue, 06 Nov 2007 03:57:56 -0600
parents 508517328f30
children e3ca505c9c66
files tcc.c tcc.h tccelf.c
diffstat 3 files changed, 12 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/tcc.c	Tue Nov 06 03:56:04 2007 -0600
+++ b/tcc.c	Tue Nov 06 03:57:56 2007 -0600
@@ -114,8 +114,8 @@
 /* XXX: get rid of this ASAP */
 static struct TCCState *tcc_state;
 
-/* give the path of the tcc libraries */
-static const char *tcc_lib_path = CONFIG_TCCDIR;
+/* give the path of the compiler's libraries */
+static const char *cc_lib_path = CC_LIB_PATH;
 
 
 /********************************************************/
@@ -8866,7 +8866,7 @@
 #ifdef TCC_TARGET_PE
     {
         char buf[1024];
-        snprintf(buf, sizeof(buf), "%s/lib", tcc_lib_path);
+        snprintf(buf, sizeof(buf), "%s/lib", cc_lib_path);
         tcc_add_library_path(s, buf);
     }
 #else
@@ -9167,10 +9167,10 @@
         tcc_add_sysinclude_path(s, "/usr/local/include");
         tcc_add_sysinclude_path(s, "/usr/include");
 #endif
-        snprintf(buf, sizeof(buf), "%s/include", tcc_lib_path);
+        snprintf(buf, sizeof(buf), "%s/include", cc_lib_path);
         tcc_add_sysinclude_path(s, buf);
 #ifdef TCC_TARGET_PE
-        snprintf(buf, sizeof(buf), "%s/include/winapi", tcc_lib_path);
+        snprintf(buf, sizeof(buf), "%s/include/winapi", cc_lib_path);
         tcc_add_sysinclude_path(s, buf);
 #endif
     }
@@ -9323,7 +9323,7 @@
 
 void help(void)
 {
-    printf("tcc version " TCC_VERSION " - Tiny C Compiler - Copyright (C) 2001-2006 Fabrice Bellard\n"
+    printf("tinycc version " TINYCC_VERSION " - Tiny C Compiler - Copyright (C) 2001-2006 Fabrice Bellard\n"
            "usage: tcc [-v] [-c] [-o outfile] [-Bdir] [-bench] [-Idir] [-Dsym[=val]] [-Usym]\n"
            "           [-Wwarn] [-g] [-b] [-bt N] [-Ldir] [-llib] [-shared] [-static]\n"
            "           [infile1 infile2...] [-run infile args...]\n"
@@ -9562,7 +9562,7 @@
                 break;
             case TCC_OPTION_B:
                 /* set tcc utilities path (mainly for tcc development) */
-                tcc_lib_path = optarg;
+                cc_lib_path = optarg;
                 break;
             case TCC_OPTION_l:
                 dynarray_add((void ***)&files, &nb_files, r);
@@ -9624,7 +9624,7 @@
                 }
                 break;
             case TCC_OPTION_v:
-                printf("tcc version %s\n", TCC_VERSION);
+                printf("tinycc version %s\n", TINYCC_VERSION);
                 exit(0);
             case TCC_OPTION_f:
                 if (tcc_set_flag(s, optarg, 1) < 0 && s->warn_unsupported)
@@ -9701,7 +9701,7 @@
             ++d;
         }
         *p = '\0';
-        tcc_lib_path = path;
+        cc_lib_path = path;
     }
 #endif
 
@@ -9719,7 +9719,7 @@
 
     if (print_search_dirs) {
         /* enough for Linux kernel */
-        printf("install: %s/\n", tcc_lib_path);
+        printf("install: %s/\n", cc_lib_path);
         return 0;
     }
 
--- a/tcc.h	Tue Nov 06 03:56:04 2007 -0600
+++ b/tcc.h	Tue Nov 06 03:57:56 2007 -0600
@@ -7,7 +7,6 @@
  *  Licensed under GPLv2, see file LICENSE in this tarball.
  */
 #define _GNU_SOURCE
-#include "config.h"
 
 #ifdef CONFIG_TCCBOOT
 
--- a/tccelf.c	Tue Nov 06 03:56:04 2007 -0600
+++ b/tccelf.c	Tue Nov 06 03:57:56 2007 -0600
@@ -994,7 +994,7 @@
                     ELF32_ST_INFO(STB_GLOBAL, STT_NOTYPE), 0,
                     bounds_section->sh_num, "__bounds_start");
         /* add bound check code */
-        snprintf(buf, sizeof(buf), "%s/%s", tcc_lib_path, "bcheck.o");
+        snprintf(buf, sizeof(buf), "%s/%s", cc_lib_path, "bcheck.o");
         tcc_add_file(s1, buf);
 #ifdef TCC_TARGET_I386
         if (s1->output_type != TCC_OUTPUT_MEMORY) {
@@ -1014,7 +1014,7 @@
     if (!s1->nostdlib) {
         tcc_add_library(s1, "c");
 
-        snprintf(buf, sizeof(buf), "%s/%s", tcc_lib_path, "libtcc1.a");
+        snprintf(buf, sizeof(buf), "%s/%s", cc_lib_path, "libtcc1.a");
         tcc_add_file(s1, buf);
     }
     /* add crt end if not memory output */