Skip to content

Commit

Permalink
Merge pull request #70 from leo60228/nixos
Browse files Browse the repository at this point in the history
Fix build on NixOS
  • Loading branch information
RevoSucks authored Oct 14, 2024
2 parents bfa92a1 + c9f7b9a commit cd0ed12
Show file tree
Hide file tree
Showing 9 changed files with 11 additions and 17 deletions.
2 changes: 1 addition & 1 deletion gcc/c-typeck.c
Original file line number Diff line number Diff line change
Expand Up @@ -3133,7 +3133,7 @@ build_unary_op (code, xarg, noconvert)
return fold (build1 (code, argtype, arg));
}

error (errstring);
error ("%s", errstring);
return error_mark_node;
}

Expand Down
5 changes: 1 addition & 4 deletions gcc/real.c
Original file line number Diff line number Diff line change
Expand Up @@ -4042,8 +4042,6 @@ mtherr (name, code)
char *name;
int code;
{
char errstr[80];

/* The string passed by the calling program is supposed to be the
name of the function in which the error occurred.
The code argument selects which error message string will be printed. */
Expand All @@ -4066,9 +4064,8 @@ mtherr (name, code)
name = "modulus";
else if (strcmp (name, "esqrt") == 0)
name = "square root";
sprintf (errstr, "%s during real %s", ermsg[code], name);
if (extra_warnings)
warning (errstr);
warning ("%s during real %s", ermsg[code], name);
/* Set global error message word */
merror = code + 1;
}
Expand Down
2 changes: 1 addition & 1 deletion gcc/toplev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,7 @@ fatal_io_error(char *name)
void
fatal_insn(char *message, rtx insn)
{
error(message);
error("%s", message);
debug_rtx(insn);
if (asm_out_file)
fflush(asm_out_file);
Expand Down
6 changes: 3 additions & 3 deletions gcc_arm/c-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1587,7 +1587,7 @@ check_format_info (info, params)
++format_chars;
if (params == 0)
{
warning (tfaff);
warning ("%s", tfaff);
return;
}
if (info->first_arg_num != 0)
Expand Down Expand Up @@ -1630,7 +1630,7 @@ check_format_info (info, params)
++format_chars;
if (params == 0)
{
warning (tfaff);
warning ("%s", tfaff);
return;
}
cur_param = TREE_VALUE (params);
Expand Down Expand Up @@ -1825,7 +1825,7 @@ check_format_info (info, params)
continue;
if (params == 0)
{
warning (tfaff);
warning ("%s", tfaff);
return;
}
cur_param = TREE_VALUE (params);
Expand Down
2 changes: 1 addition & 1 deletion gcc_arm/c-typeck.c
Original file line number Diff line number Diff line change
Expand Up @@ -3147,7 +3147,7 @@ build_unary_op (code, xarg, noconvert)
return fold (build1 (code, argtype, arg));
}

error (errstring);
error ("%s", errstring);
return error_mark_node;
}

Expand Down
2 changes: 1 addition & 1 deletion gcc_arm/cccp.c
Original file line number Diff line number Diff line change
Expand Up @@ -8676,7 +8676,7 @@ macroexpand (hp, op)
else
parse_error = macarg (NULL_PTR, 0);
if (parse_error) {
error_with_line (line_for_error (start_line), parse_error);
error_with_line (line_for_error (start_line), "%s", parse_error);
break;
}
i++;
Expand Down
5 changes: 1 addition & 4 deletions gcc_arm/real.c
Original file line number Diff line number Diff line change
Expand Up @@ -5703,8 +5703,6 @@ mtherr (name, code)
char *name;
int code;
{
char errstr[80];

/* The string passed by the calling program is supposed to be the
name of the function in which the error occurred.
The code argument selects which error message string will be printed. */
Expand All @@ -5727,9 +5725,8 @@ mtherr (name, code)
name = "modulus";
else if (strcmp (name, "esqrt") == 0)
name = "square root";
sprintf (errstr, "%s during real %s", ermsg[code], name);
if (extra_warnings)
warning (errstr);
warning ("%s during real %s", ermsg[code], name);
/* Set global error message word */
merror = code + 1;
}
Expand Down
2 changes: 1 addition & 1 deletion gcc_arm/toplev.c
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ fatal_insn (message, insn)
char *message;
rtx insn;
{
error (message);
error ("%s", message);
debug_rtx (insn);
if (asm_out_file)
fflush (asm_out_file);
Expand Down
2 changes: 1 addition & 1 deletion libc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export AR := $(PREFIX)ar
export AS := $(PREFIX)as
endif

SHELL := /bin/bash -o pipefail
SHELL := bash -o pipefail

ASFLAGS := -mcpu=arm7tdmi

Expand Down

0 comments on commit cd0ed12

Please sign in to comment.