Mercurial > hg > aboriginal
comparison sources/toys/ccwrap.c @ 812:4e1e6aa7f445
Convince gcc to build/install libgcc_eh.a even for --disable-shared compilers, and tell the wrapper to expect it.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 22 Aug 2009 04:07:00 -0500 |
parents | d0b74a631587 |
children | 1067e99efbdc |
comparison
equal
deleted
inserted
replaced
811:aea72ecff868 | 812:4e1e6aa7f445 |
---|---|
3 * Copyright (C) 2000 Manuel Novoa III | 3 * Copyright (C) 2000 Manuel Novoa III |
4 * Copyright (C) 2002-2003 Erik Andersen | 4 * Copyright (C) 2002-2003 Erik Andersen |
5 * Copyright (C) 2006-2009 Rob Landley <rob@landley.net> | 5 * Copyright (C) 2006-2009 Rob Landley <rob@landley.net> |
6 * | 6 * |
7 * Wrapper to use uClibc with gcc, and make gcc relocatable. | 7 * Wrapper to use uClibc with gcc, and make gcc relocatable. |
8 * | |
9 * Licensed under GPLv2. | |
8 */ | 10 */ |
9 | 11 |
10 #define _GNU_SOURCE | 12 #define _GNU_SOURCE |
11 #include <alloca.h> | 13 #include <alloca.h> |
12 #include <stdio.h> | 14 #include <stdio.h> |
40 if (!use_static_linking) \ | 42 if (!use_static_linking) \ |
41 gcc_argv[argcnt++] = "-Wl,--as-needed,-lgcc_s,--no-as-needed"; \ | 43 gcc_argv[argcnt++] = "-Wl,--as-needed,-lgcc_s,--no-as-needed"; \ |
42 else gcc_argv[argcnt++] = "-lgcc_eh"; \ | 44 else gcc_argv[argcnt++] = "-lgcc_eh"; \ |
43 } while (0); | 45 } while (0); |
44 #else | 46 #else |
45 #define ADD_GCC_S() | 47 #define ADD_GCC_S() gcc_argv[argcnt++] = "-lgcc_eh" |
46 #endif | 48 #endif |
47 | 49 |
48 // Confirm that a regular file exists, and (optionally) has the executable bit. | 50 // Confirm that a regular file exists, and (optionally) has the executable bit. |
49 int is_file(char *filename, int has_exe) | 51 int is_file(char *filename, int has_exe) |
50 { | 52 { |