Skip to content

Commit

Permalink
Merge pull request #39 from luckytyphlosion/master
Browse files Browse the repository at this point in the history
Fix builds on xcode 12+
  • Loading branch information
luckytyphlosion authored Aug 9, 2021
2 parents bd1b2f5 + 5297ebf commit 1cff637
Show file tree
Hide file tree
Showing 10 changed files with 24 additions and 13 deletions.
2 changes: 1 addition & 1 deletion gcc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ VPATH = $(srcdir)

CC = gcc

BASE_CFLAGS = -g -std=gnu11
BASE_CFLAGS = -g -std=gnu11 -Werror-implicit-function-declaration

INCLUDES = -I. -I$(srcdir)

Expand Down
1 change: 1 addition & 0 deletions gcc/toplev.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include "except.h"
#include "toplev.h"
#include "expr.h"
#include "unistd.h"

#if defined (DWARF2_DEBUGGING_INFO)
#include "dwarf2out.h"
Expand Down
2 changes: 1 addition & 1 deletion gcc_arm/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ALLOCA_FINISH = true
XCFLAGS =
TCFLAGS =
# CYGNUS LOCAL nowarnings/law
CFLAGS = -g
CFLAGS = -g -Werror-implicit-function-declaration
BOOT_CFLAGS = -O2 $(CFLAGS)
WARN_CFLAGS =
# END CYGNUS LOCAL
Expand Down
2 changes: 1 addition & 1 deletion gcc_arm/config/arm/arm.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA. */
#include "tree.h"
#include "expr.h"
#include "toplev.h"
#include "recog.h"

/* The maximum number of insns skipped which will be conditionalised if
possible. */
Expand All @@ -47,7 +48,6 @@ extern FILE *asm_out_file;
/* Some function declarations. */

/* CYGNUS LOCAL */
void arm_increase_location PROTO ((int));
static int get_prologue_size PROTO ((void));
/* END CYGNUS LOCAL */

Expand Down
6 changes: 6 additions & 0 deletions gcc_arm/config/arm/arm.h
Original file line number Diff line number Diff line change
Expand Up @@ -2215,4 +2215,10 @@ int ok_integer_or_other ();
/* END CYGNUS LOCAL */
int s_register_operand (/* register rtx op, enum machine_mode mode */);

void arm_asm_output_label (/*FILE *, char **/);
void arm_increase_location PARAMS ((int));
int short_branch PARAMS ((int, int));
int arm_insn_not_targeted (/* rtx */);
int arm_backwards_branch PARAMS ((int, int));

#endif /* __ARM_H__ */
3 changes: 1 addition & 2 deletions gcc_arm/gcse.c
Original file line number Diff line number Diff line change
Expand Up @@ -5168,9 +5168,8 @@ invalidate_nonnull_info (x, setter)
This could probably be integrated with global cprop with a little work. */

void
delete_null_pointer_checks (f, pass)
delete_null_pointer_checks (f)
rtx f;
int pass;
{
int_list_ptr *s_preds, *s_succs;
int *num_preds, *num_succs;
Expand Down
2 changes: 1 addition & 1 deletion gcc_arm/genoutput.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ from the machine description file `md'. */\n\n");
printf ("#include \"insn-attr.h\"\n\n");
printf ("#include \"insn-codes.h\"\n\n");
printf ("#include \"recog.h\"\n\n");

printf ("#include \"tree.h\"\n");
printf ("#include \"output.h\"\n");
}

Expand Down
2 changes: 2 additions & 0 deletions gcc_arm/range.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Boston, MA 02111-1307, USA. */
#include "range.h"
#include "toplev.h"

void init_regset_vector PROTO ((regset *, int, struct obstack *));

extern struct obstack *rtl_obstack;

/* Information that we gather about registers */
Expand Down
3 changes: 3 additions & 0 deletions gcc_arm/rtl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1449,6 +1449,9 @@ extern int gcse_main PROTO ((rtx, FILE *));
/* END CYGNUS LOCAL */
#endif

extern void delete_null_pointer_checks PARAMS ((rtx));
extern void merge_blocks PARAMS ((rtx));

/* In global.c */
extern void mark_elimination PROTO ((int, int));
#ifdef BUFSIZ
Expand Down
14 changes: 7 additions & 7 deletions libgcc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ endif
CC1 = ../old_agbcc

libgcc.a: libgcc1.a libgcc2.a fp-bit.o dp-bit.o
$(AR) -x libgcc1.a
$(AR) -x libgcc2.a
$(AR) -x libgcc1.a;
$(AR) -x libgcc2.a;
$(AR) -rc libgcc.a *.o

LIB1ASMFUNCS = _udivsi3 _divsi3 _umodsi3 _modsi3 _dvmd_tls _call_via_rX
Expand Down Expand Up @@ -66,19 +66,19 @@ libgcc2.a: libgcc2.c longlong.h
mv tmplibgcc2.a libgcc2.a

fp-bit.o: fp-bit.c
$(CPP) -undef -I ../ginclude -nostdinc -o fp-bit.i fp-bit.c
$(CPP) -undef -I ../ginclude -nostdinc -o fp-bit.i fp-bit.c;
$(CC1) -O2 fp-bit.i
rm -f fp-bit.i
bash -c 'echo -e ".text\n\t.align\t2, 0\n"' >> fp-bit.s
$(AS) -mcpu=arm7tdmi -o fp-bit.o fp-bit.s
$(AS) -mcpu=arm7tdmi -o fp-bit.o fp-bit.s;
rm -f fp-bit.s

dp-bit.o: dp-bit.c
$(CPP) -undef -I ../ginclude -nostdinc -o dp-bit.i dp-bit.c
$(CPP) -undef -I ../ginclude -nostdinc -o dp-bit.i dp-bit.c;
$(CC1) -O2 dp-bit.i
rm -f dp-bit.i
bash -c 'echo -e ".text\n\t.align\t2, 0\n"' >> dp-bit.s
$(AS) -mcpu=arm7tdmi -o dp-bit.o dp-bit.s
$(AS) -mcpu=arm7tdmi -o dp-bit.o dp-bit.s;
rm -f dp-bit.s

fp-bit.c: fp-bit-base.c
Expand All @@ -94,4 +94,4 @@ dp-bit.c: fp-bit-base.c
.PHONY: clean

clean:
rm -f *.o *.a *.s *.i
rm -f *.o *.a *.s *.i

0 comments on commit 1cff637

Please sign in to comment.