Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 417793 - toolchain.eclass has wrong needed_libc for CTARGET=*-w64-mingw32
Summary: toolchain.eclass has wrong needed_libc for CTARGET=*-w64-mingw32
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-27 15:53 UTC by Matt Whitlock
Modified: 2012-05-30 15:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Whitlock 2012-05-27 15:53:57 UTC
MinGW-w64 toolchains use mingw64-runtime as their libc, but gcc_do_configure() in toolchain.eclass looks for ${CATEGORY}/mingw-runtime for both MinGW32 and MinGW-w64 toolchains regardless.

One line needs to be added to toolchain.eclass:

 	if is_crosscompile ; then
 		# When building a stage1 cross-compiler (just C compiler), we have to
 		# disable a bunch of features or gcc goes boom
 		local needed_libc=""
 		case ${CTARGET} in
 			*-linux)		 needed_libc=no-fucking-clue;;
 			*-dietlibc)		 needed_libc=dietlibc;;
 			*-elf|*-eabi)	 needed_libc=newlib;;
 			*-freebsd*)		 needed_libc=freebsd-lib;;
 			*-gnu*)			 needed_libc=glibc;;
 			*-klibc)		 needed_libc=klibc;;
 			*-uclibc*)		 needed_libc=uclibc;;
 			*-cygwin)        needed_libc=cygwin;;
+			*-w64-mingw*)	 needed_libc=mingw64-runtime;;
 			mingw*|*-mingw*) needed_libc=mingw-runtime;;
 			avr)			 confgcc+=" --enable-shared --disable-threads";;
 		esac
Comment 1 Matt Whitlock 2012-05-27 16:33:39 UTC
(In reply to comment #0)
> +			*-w64-mingw*)	 needed_libc=mingw64-runtime;;

After making the above addition in toolchain.ebuild, emerging of gcc fails with this message:

The directory that should contain system headers does not exist:
  /usr/x86_64-w64-mingw32/mingw/include

As an attempt at a temporary workaround, I've placed a mingw->usr symlink at /usr/x86_64-w64-mingw32. I'm rebuilding now to see if the symlink allows gcc to build.