[Mingw-w64-public] Add source files for pseh and change build system accordingly
Note: there are symlinks from i386 to i486, i586, and i686 that I couldn't get to show up in the patch. This patch adds pseh files for x86_64 and changes the build system accordingly so pseh can be built for x86_64. Please tell me if there's anything wrong with this. diff -Naur --no-dereference a/mingw-w64/mingw-w64-libraries/pseh/configure b/mingw-w64/mingw-w64-libraries/pseh/configure --- a/mingw-w64/mingw-w64-libraries/pseh/configure2018-10-21 19:43:00.455270976 -0400 +++ b/mingw-w64/mingw-w64-libraries/pseh/configure2018-10-26 11:06:18.133426429 -0400 @@ -706,6 +706,7 @@ docdir oldincludedir includedir +runstatedir localstatedir sharedstatedir sysconfdir @@ -780,6 +781,7 @@ sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' +runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' @@ -1032,6 +1034,15 @@ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; + -runstatedir | --runstatedir | --runstatedi | --runstated \ + | --runstate | --runstat | --runsta | --runst | --runs \ + | --run | --ru | --r) +ac_prev=runstatedir ;; + -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ + | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ + | --run=* | --ru=* | --r=*) +runstatedir=$ac_optarg ;; + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ @@ -1169,7 +1180,7 @@ for ac_var inexec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ -libdir localedir mandir +libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. @@ -1322,6 +1333,7 @@ --sysconfdir=DIRread-only single-machine data [PREFIX/etc] --sharedstatedir=DIRmodifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIRobject code libraries [EPREFIX/lib] --includedir=DIRC header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] @@ -2734,15 +2746,6 @@ -case $host in #( - i*86-*-mingw*) : - ;; #( - *) : -as_fn_error $? "Only x86 32-bit Win32 host variants are supported" "$LINENO" 5 ;; #( - *) : - ;; -esac - # Checks for programs. ac_ext=c ac_cpp='$CPP $CPPFLAGS' diff -Naur --no-dereference a/mingw-w64/mingw-w64-libraries/pseh/ configure.ac b/mingw-w64/mingw-w64-libraries/pseh/configure.ac --- a/mingw-w64/mingw-w64-libraries/pseh/configure.ac2018-10-21 19:43:00.455270976 -0400 +++ b/mingw-w64/mingw-w64-libraries/pseh/configure.ac2018-10-21 19:48:58.0 -0400 @@ -11,10 +11,6 @@ AC_CANONICAL_HOST -AS_CASE([$host], -[i*86-*-mingw*],[], -[*],[AC_MSG_ERROR([Only x86 32-bit Win32 host variants are supported])]) - # Checks for programs. AC_PROG_CC AC_PROG_RANLIB diff -Naur --no-dereference a/mingw-w64/mingw-w64-libraries/pseh/Makefile.am b/mingw-w64/mingw-w64-libraries/pseh/Makefile.am --- a/mingw-w64/mingw-w64-libraries/pseh/Makefile.am2018-10-21 19:43:00.455270976 -0400 +++ b/mingw-w64/mingw-w64-libraries/pseh/Makefile.am2018-10-26 11:05:36.053217764 -0400 @@ -6,10 +6,10 @@ lib_LIBRARIES = libpseh.a libpseh_a_SOURCES = \ - src/framebased.c \ - src/i386/framebased-gcchack-asm.S \ - src/i386/framebased-gcchack.c \ - src/i386/framebased.S +src/@host_cpu@/framebased.c \ +src/@host_cpu@/framebased-gcchack-asm.S \ +src/@host_cpu@/framebased-gcchack.c \ +src/@host_cpu@/framebased-asm.S psehdir = $(includedir)/pseh framebaseddir = $(psehdir)/framebased diff -Naur --no-dereference a/mingw-w64/mingw-w64-libraries/pseh/Makefile.in b/mingw-w64/mingw-w64-libraries/pseh/Makefile.in --- a/mingw-w64/mingw-w64-libraries/pseh/Makefile.in2018-10-21 19:43:00.455270976 -0400 +++ b/mingw-w64/mingw-w64-libraries/pseh/Makefile.in2018-10-26 11:06:19.229431863 -0400 @@ -142,10 +142,10 @@ libpseh_a_AR = $(AR) $(ARFLAGS) libpseh_a_LIBADD = am__dirstamp = $(am__leading_dot)dirstamp -am_libpseh_a_OBJECTS = src/framebased.$(OBJEXT) \ -src/i386/framebased-gcchack-asm.$(OBJEXT) \ -src/i386/framebased-gcchack.$(OBJEXT) \ -src/i386/framebased.$(OBJEXT) +am_libpseh_a_OBJECTS = src/@host_cpu@/framebased.$(OBJEXT) \ +src/@host_cpu@/framebased-gcchack-asm.$(OBJEXT) \ +src/@host_cpu@/framebased-gcchack.$(OBJEXT) \ +src/@host_cpu@/framebased-asm.$(OBJEXT) libpseh_a_OBJECTS = $(am_libpseh_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -328,6 +328,7 @@ prefix = @prefix@ program_transform_name = @program_transf
Re: [Mingw-w64-public] Mingw-w64 builds twice.
These are the steps I used to reproduce it: Clone the mingw-w64 git repository from Sourceforge: `git clone https://git.code.sf.net/p/mingw-w64/mingw-w64 mingw-w64-mingw-w64` Install all the '*mingw*' packages in the Debian Stretch archive: `sudo apt-get install *mingw*` cd mingw-w64 mkdir build && cd build ../configure --prefix=/usr/x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --with-headers --with-crt --with-tools=all --with-libraries=mangle,winpthreads sudo make -C mingw-w64-headers install make sudo make install # (Builds mingw-w64-crt yet again) On Tue, Oct 23, 2018 at 12:26 PM David Grayson wrote: > For what it's worth, I just tried the latest version of mingw-w64 and I am > not seeing any issue with the CRT getting compiled again when `make > install` is run. > > My build scripts are here: > https://github.com/DavidEGrayson/nixcrpkgs/tree/master/mingw-w64 > > The basic procedure is: > > 1) Before any mingw-w64 GCC is available, install the headers with: > > mingw-w64-headers/configure, make, make install > > 2) Build a temporary mingw-w64 GCC and install it. > > 3) Build the CRT and the headers using the top-level configure script and > install them: > > ./configure, make, make install > > 4) Build a final mingw-w64 GCC and install it. > > I don't think I totally made up this procedure, I got it by looking at > other people's work. > > --David > > On Tue, Oct 23, 2018 at 4:01 AM James Larrowe > wrote: > > > No, but I did do something similar. I first installed the headers, like > you > > suggested, but then I created a seperate build directory (build) in the > > root tree. I then proceeded to compile the crt, tools, and libraries. > While > > in the build directory, `make install` still ran the compilation for > > mingw-w64-crt. > > > > On Mon, Oct 22, 2018 at 10:18 PM Liu Hao wrote: > > > > > 在 2018/10/23 5:15, James Larrowe 写道: > > > > Mingw-w64 (Latest git version), builds twice: once during `make`, and > > > once > > > > during `make install`. It seems to be that it only builds > mingw-w64-crt > > > > twice. Any suggestions? > > > > > > > > > > Did you run 'configure' followed by 'make' from _the project root > > > directory_ ? > > > > > > Don't do that. The correct steps to build mingw-w64 from source are: > > > > > > 1. CD into 'mingw-w64-headers'. > > > 2. Run `./configure` with proper options, followed by `make`. > > > 3. Run `make install`. This installs new headers into the usual > > >directory. > > > 4. CD back into '../mingw-w64-crt'. > > > 5. Run `./configure` with proper options, followed by `make`. > > >Here you might have already known why step 3 is essential: The > > >new headers have to be installed for consumption by your compiler > > >during this process. > > > 6. Run `make install`. This installs new libraries and CRT object > > >files into the usual directory. > > > > > > > > > -- > > > Best regards, > > > LH_Mouse > > > > > > ___ > > > Mingw-w64-public mailing list > > > Mingw-w64-public@lists.sourceforge.net > > > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > > > > > > > ___ > > Mingw-w64-public mailing list > > Mingw-w64-public@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > > > > ___ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] Mingw-w64 builds twice.
No, but I did do something similar. I first installed the headers, like you suggested, but then I created a seperate build directory (build) in the root tree. I then proceeded to compile the crt, tools, and libraries. While in the build directory, `make install` still ran the compilation for mingw-w64-crt. On Mon, Oct 22, 2018 at 10:18 PM Liu Hao wrote: > 在 2018/10/23 5:15, James Larrowe 写道: > > Mingw-w64 (Latest git version), builds twice: once during `make`, and > once > > during `make install`. It seems to be that it only builds mingw-w64-crt > > twice. Any suggestions? > > > > Did you run 'configure' followed by 'make' from _the project root > directory_ ? > > Don't do that. The correct steps to build mingw-w64 from source are: > > 1. CD into 'mingw-w64-headers'. > 2. Run `./configure` with proper options, followed by `make`. > 3. Run `make install`. This installs new headers into the usual >directory. > 4. CD back into '../mingw-w64-crt'. > 5. Run `./configure` with proper options, followed by `make`. >Here you might have already known why step 3 is essential: The >new headers have to be installed for consumption by your compiler >during this process. > 6. Run `make install`. This installs new libraries and CRT object >files into the usual directory. > > > -- > Best regards, > LH_Mouse > > ___ > Mingw-w64-public mailing list > Mingw-w64-public@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
[Mingw-w64-public] Mingw-w64 builds twice.
Mingw-w64 (Latest git version), builds twice: once during `make`, and once during `make install`. It seems to be that it only builds mingw-w64-crt twice. Any suggestions? Info: target=x86_64-w64-mingw32 libraries=mangle,winpthreads tools=all prefix=/usr/x86_64-w64-mingw32 Pastebin link for config.log : https://pastebin.com/kUGtzHcb ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public