enable -Werror by default globally

. to fix a warning, make gcc believe our gas supports
	  visibility
	. and fix a other remaining warnings

Change-Id: I7c519b5f6e864d5a25554ee0c127df4591292e6b
This commit is contained in:
Ben Gras 2013-08-14 12:30:22 +00:00
parent d5c6c6a51b
commit c4e99a3818
6 changed files with 16 additions and 22 deletions

View File

@ -967,7 +967,7 @@
/* Define if your assembler and linker support .hidden. */ /* Define if your assembler and linker support .hidden. */
/* #undef HAVE_GAS_HIDDEN */ #define HAVE_GAS_HIDDEN 1
/* Define if your assembler supports .lcomm with an alignment field. */ /* Define if your assembler supports .lcomm with an alignment field. */
#ifndef USED_FOR_TARGET #ifndef USED_FOR_TARGET

View File

@ -967,7 +967,7 @@
/* Define if your assembler and linker support .hidden. */ /* Define if your assembler and linker support .hidden. */
/* #undef HAVE_GAS_HIDDEN */ #define HAVE_GAS_HIDDEN 1
/* Define if your assembler supports .lcomm with an alignment field. */ /* Define if your assembler supports .lcomm with an alignment field. */
#ifndef USED_FOR_TARGET #ifndef USED_FOR_TARGET

View File

@ -85,12 +85,6 @@ LDS_RELOC= ${LDS_PATH}/elf_${MACHINE_ARCH}_minix.xr
LDS_SHARED_LIB= ${LDS_PATH}/elf_${MACHINE_ARCH}_minix.xsc LDS_SHARED_LIB= ${LDS_PATH}/elf_${MACHINE_ARCH}_minix.xsc
LDS_N= ${LDS_PATH}/elf_${MACHINE_ARCH}_minix.xbn LDS_N= ${LDS_PATH}/elf_${MACHINE_ARCH}_minix.xbn
# LSC In the current state there is too much to be done
# Some package have been identified by directly adding NOGCCERROR
# To their Makefiles
NOGCCERROR?= yes
NOCLANGERROR?= yes
AFLAGS+= -D__ASSEMBLY__ AFLAGS+= -D__ASSEMBLY__
CFLAGS+= -fno-builtin CFLAGS+= -fno-builtin

View File

@ -44,7 +44,6 @@ COMMON_CONFIGURE_ARGS= --target=${MACHINE_GNU_PLATFORM} \
COMMON_CONFIGURE_ARGS+= \ COMMON_CONFIGURE_ARGS+= \
--disable-libssp \ --disable-libssp \
--disable-threads \ --disable-threads \
--disable-visibility \
--disable-libunwind --disable-libunwind
.if ${HOST_OSTYPE:C/\-.*//} == "Minix" .if ${HOST_OSTYPE:C/\-.*//} == "Minix"

View File

@ -230,12 +230,12 @@ static int print_memory(void)
{ {
FILE *fp; FILE *fp;
unsigned int pagesize; unsigned int pagesize;
unsigned long total, free, largest, cached; unsigned long total, freemem, largest, cached;
if ((fp = fopen("meminfo", "r")) == NULL) if ((fp = fopen("meminfo", "r")) == NULL)
return 0; return 0;
if (fscanf(fp, "%u %lu %lu %lu %lu", &pagesize, &total, &free, if (fscanf(fp, "%u %lu %lu %lu %lu", &pagesize, &total, &freemem,
&largest, &cached) != 5) { &largest, &cached) != 5) {
fclose(fp); fclose(fp);
return 0; return 0;
@ -245,7 +245,7 @@ static int print_memory(void)
printf("main memory: %ldK total, %ldK free, %ldK contig free, " printf("main memory: %ldK total, %ldK free, %ldK contig free, "
"%ldK cached\n", "%ldK cached\n",
(pagesize * total)/1024, (pagesize * free)/1024, (pagesize * total)/1024, (pagesize * freemem)/1024,
(pagesize * largest)/1024, (pagesize * cached)/1024); (pagesize * largest)/1024, (pagesize * cached)/1024);
return 1; return 1;
@ -290,7 +290,8 @@ struct tp {
static int cmp_procs(const void *v1, const void *v2) static int cmp_procs(const void *v1, const void *v2)
{ {
struct tp *p1 = (struct tp *) v1, *p2 = (struct tp *) v2; struct tp *p1 = (struct tp *) __UNCONST(v1),
*p2 = (struct tp *) __UNCONST(v2);
int p1blocked, p2blocked; int p1blocked, p2blocked;
if(order == ORDER_MEMORY) { if(order == ORDER_MEMORY) {

View File

@ -290,18 +290,18 @@ static char * parse_mode(int mode){
} }
static int static int
dump_entry(FILE * out, int index, const char *base_dir) dump_entry(FILE * out, int mindex, const char *base_dir)
{ {
int space; int space;
int i; int i;
struct entry *entry = &entries[index]; struct entry *entry = &entries[mindex];
if (entry->type == ENTRY_DIR) { if (entry->type == ENTRY_DIR) {
for (space = 0; space < entries[index].depth; space++) { for (space = 0; space < entries[mindex].depth; space++) {
fprintf(out, " "); fprintf(out, " ");
} }
if (entries[index].depth > 0) { if (entries[mindex].depth > 0) {
fprintf(out, "%s ", entry->filename); fprintf(out, "%s ", entry->filename);
} }
fprintf(out, "d%s", parse_mode(entry->mode)); fprintf(out, "d%s", parse_mode(entry->mode));
@ -313,12 +313,12 @@ dump_entry(FILE * out, int index, const char *base_dir)
dump_entry(out, i, base_dir); dump_entry(out, i, base_dir);
} }
} }
for (space = 0; space < entries[index].depth; space++) { for (space = 0; space < entries[mindex].depth; space++) {
fprintf(out, " "); fprintf(out, " ");
} }
fprintf(out, "$\n"); fprintf(out, "$\n");
} else if (entry->type == ENTRY_FILE) { } else if (entry->type == ENTRY_FILE) {
for (space = 0; space < entries[index].depth; space++) { for (space = 0; space < entries[mindex].depth; space++) {
fprintf(out, " "); fprintf(out, " ");
} }
/* hack skipping the first . in the path */ /* hack skipping the first . in the path */
@ -326,7 +326,7 @@ dump_entry(FILE * out, int index, const char *base_dir)
parse_mode(entry->mode), entry->uid, entry->gid, base_dir, parse_mode(entry->mode), entry->uid, entry->gid, base_dir,
&entry->path[1]); &entry->path[1]);
} else if (entry->type == ENTRY_LINK) { } else if (entry->type == ENTRY_LINK) {
for (space = 0; space < entries[index].depth; space++) { for (space = 0; space < entries[mindex].depth; space++) {
fprintf(out, " "); fprintf(out, " ");
} }
/* hack skipping the first . in the path */ /* hack skipping the first . in the path */
@ -335,7 +335,7 @@ dump_entry(FILE * out, int index, const char *base_dir)
} else { } else {
/* missing "b" and "c" for block and char device? */ /* missing "b" and "c" for block and char device? */
fprintf(out, "# "); fprintf(out, "# ");
for (space = 1; space < entries[index].depth; space++) { for (space = 1; space < entries[mindex].depth; space++) {
fprintf(out, " "); fprintf(out, " ");
} }
fprintf(out, "%i %s\n", entry->type, entry->path); fprintf(out, "%i %s\n", entry->type, entry->path);
@ -360,7 +360,7 @@ dump_proto(FILE * out, const char *base_dir)
} }
static void static void
print_usage() print_usage(void)
{ {
printf("Usage: toproto [OPTION]...\n"); printf("Usage: toproto [OPTION]...\n");
printf printf