Port-arm archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

cross-build aarch64 from macOS not working? Seems to be a result of newer gcc?



Hi.

I’m trying to cross-build NetBSD for aarch64.  It worked in the past (I think around the time 9.0 came out) — I used to do it all the time, but then I got busy with some other stuff and now that I’ve come back, it’s failing.

The tools build fine — i.e., 

	./build.sh -u -U -m evbarm -a aarch64 tools

works and installs my tools in the desired place.

But building the distribution:

	./build.sh -u -U -m evbarm -a aarch64 distribution

fails, during the point that it’s building GCC (i.e., the GCC that’s actually for the ARM target).

During the process of building GCC, it builds a few tools that are run on the host (mac OS), and these of course build with clang (I don’t know if that’s important, but it seems likely to be different than other systems).  Several of these tools successfully build and run (genattr, genconditions, etc).

But building “gencondmd” fails because it can’t find some symbols:

	#      link  backend/gencondmd
	c++ -std=gnu++98 
		-I/Volumes/Code/Code/BuildNew/NetBSD/evbarm/aarch64/obj/Volumes/Code/Code/Library/NetBSD/clean/netbsd-9/src/external/gpl3/gcc/usr.bin/backend 
		-I/Volumes/Code/Code/BuildNew/NetBSD/evbarm/aarch64/obj/Volumes/Code/Code/Library/NetBSD/clean/netbsd-9/src/external/gpl3/gcc/usr.bin/host-libiberty/libiberty 
		-I. 
		-I/Volumes/Code/Code/Library/NetBSD/clean/netbsd-9/src/external/gpl3/gcc/usr.bin/backend/../gcc/arch/aarch64 
		-DIN_GCC 
		-DHAVE_CONFIG_H 
		-I/Volumes/Code/Code/Library/NetBSD/clean/netbsd-9/src/external/gpl3/gcc/dist/gcc 
		-I/Volumes/Code/Code/Library/NetBSD/clean/netbsd-9/src/external/gpl3/gcc/dist/gcc/. 
		-I/Volumes/Code/Code/Library/NetBSD/clean/netbsd-9/src/external/gpl3/gcc/dist/gcc/../include 
		-I/Volumes/Code/Code/Library/NetBSD/clean/netbsd-9/src/external/gpl3/gcc/dist/gcc/../libcpp/include 
		-I/Volumes/Code/Code/Library/NetBSD/clean/netbsd-9/src/external/gpl3/gcc/dist/gcc/../libdecnumber 
		-I/Volumes/Code/Code/Library/NetBSD/clean/netbsd-9/src/external/gpl3/gcc/dist/gcc/../libdecnumber/dpd 
		-I/Volumes/Code/Code/Library/NetBSD/clean/netbsd-9/src/external/gpl3/gcc/dist/gcc/../libbacktrace 
		-DGENERATOR_FILE 
		-I/Volumes/Code/Code/Library/NetBSD/clean/netbsd-9/src/external/gpl3/gcc/usr.bin/backend/..  
		-o gencondmd 
		gencondmd.lo 
		build-rtl.lo 
		read-rtl.lo 
		build-ggc-none.lo 
		vec.lo 
		min-insn-modes.lo 
		gensupport.lo 
		build-print-rtl.lo 
		hash-table.lo 
		read-md.lo 
		build-errors.lo 
		-L/Volumes/Code/Code/ToolsNew/NetBSD/evbarm/aarch64/lib 
		-lnbcompat 
			/Volumes/Code/Code/BuildNew/NetBSD/evbarm/aarch64/obj/Volumes/Code/Code/Library/NetBSD/clean/netbsd-9/src/external/gpl3/gcc/usr.bin/host-libiberty/libiberty/libiberty.a 

Undefined symbols for architecture x86_64:
  "_aarch64_isa_flags", referenced from:
      ___cxx_global_var_init in gencondmd.lo
  "_aarch64_tls_dialect", referenced from:
      ___cxx_global_var_init in gencondmd.lo
  "_const_int_rtx", referenced from:
      ___cxx_global_var_init in gencondmd.lo
  "_flag_modulo_sched", referenced from:
      ___cxx_global_var_init in gencondmd.lo
  "_flag_rounding_math", referenced from:
      ___cxx_global_var_init in gencondmd.lo
  "_operands", referenced from:
      ___cxx_global_var_init in gencondmd.lo
  "_optimize", referenced from:
      ___cxx_global_var_init in gencondmd.lo
  "_ptr_mode", referenced from:
      ___cxx_global_var_init in gencondmd.lo
  "_reload_completed", referenced from:
      ___cxx_global_var_init in gencondmd.lo
  "_reload_in_progress", referenced from:
      ___cxx_global_var_init in gencondmd.lo
ld: symbol(s) not found for architecture x86_64

 
I’ve been looking at this for a few days (though I did go down a very incorrect path for part of that), and haven’t figured anything out — I don’t know enough about GCC to understand what’s going on here.

Does anyone who understands this better have any ideas?

Thanks!

Rob



Home | Main Index | Thread Index | Old Index