Skip to content

Commit

Permalink
Fix GCC 10+ cross-compiling issues
Browse files Browse the repository at this point in the history
Current master cannot be cross-compiled due to gcc breaking changes.
This patchset is a workaround for this problem until source tree is
synchronized with current NetBSD.
There is a binutils patch which I cannot add to pull request, so I link
it here: https://gist.github.com/Santurysim/1973b8f723fb36242c9558a23408d469
  • Loading branch information
petershh committed Jul 18, 2021
1 parent 4db99f4 commit 75e1aba
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 7 deletions.
1 change: 0 additions & 1 deletion bin/pax/extern.h
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ void options(int, char **);
OPLIST * opt_next(void);
int bad_opt(void);
int mkpath(char *);
char *chdname;
#if !HAVE_NBTOOL_CONFIG_H
int do_chroot;
#endif
Expand Down
2 changes: 2 additions & 0 deletions bin/pax/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,8 @@ int havechd = 0;
* parser
*/

char *chdname;

void
options(int argc, char **argv)
{
Expand Down
2 changes: 1 addition & 1 deletion external/bsd/llvm/dist/llvm/include/llvm/IR/ValueMap.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ class ValueMap {

~ValueMap() {}

bool hasMD() const { return MDMap; }
bool hasMD() const { return (bool)MDMap; }
MDMapT &MD() {
if (!MDMap)
MDMap.reset(new MDMapT);
Expand Down
4 changes: 2 additions & 2 deletions sbin/newfs_udf/newfs_udf.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ extern float meta_fract;


/* shared structure between udf_create.c users */
struct udf_create_context context;
struct udf_disclayout layout;
extern struct udf_create_context context;
extern struct udf_disclayout layout;

/* prototypes */
int udf_write_sector(void *sector, uint64_t location);
Expand Down
4 changes: 4 additions & 0 deletions sbin/newfs_udf/udf_create.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ __RCSID("$NetBSD: udf_create.c,v 1.25 2015/06/16 23:18:55 christos Exp $");
# endif
#endif

/* shared structure between udf_create.c users */
struct udf_create_context context;
struct udf_disclayout layout;

/*
* NOTE that there is some overlap between this code and the udf kernel fs.
* This is intentially though it might better be factored out one day.
Expand Down
2 changes: 2 additions & 0 deletions usr.bin/make/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ char *makeDependfile;
pid_t myPid;
int makelevel;

FILE *debug_file;

Boolean forceJobs = FALSE;

extern Lst parseIncPath;
Expand Down
2 changes: 1 addition & 1 deletion usr.bin/make/make.h
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ extern pid_t myPid;
* There is one bit per module. It is up to the module what debug
* information to print.
*/
FILE *debug_file; /* Output written here - default stdout */
extern FILE *debug_file; /* Output written here - default stdout */
extern int debug;
#define DEBUG_ARCH 0x00001
#define DEBUG_COND 0x00002
Expand Down
2 changes: 0 additions & 2 deletions usr.sbin/installboot/machines.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,11 @@ __RCSID("$NetBSD: machines.c,v 1.39 2014/02/24 07:23:44 skrll Exp $");
*/
struct ib_mach
ib_mach_alpha,
ib_mach_amd64,
ib_mach_amiga,
ib_mach_emips,
ib_mach_ews4800mips,
ib_mach_hp300,
ib_mach_hppa,
ib_mach_i386,
ib_mach_landisk,
ib_mach_macppc,
ib_mach_news68k,
Expand Down

0 comments on commit 75e1aba

Please sign in to comment.