summaryrefslogtreecommitdiff
path: root/binary/mingw/NOTES
diff options
context:
space:
mode:
Diffstat (limited to 'binary/mingw/NOTES')
-rw-r--r--binary/mingw/NOTES73
1 files changed, 73 insertions, 0 deletions
diff --git a/binary/mingw/NOTES b/binary/mingw/NOTES
new file mode 100644
index 0000000..ec2a485
--- /dev/null
+++ b/binary/mingw/NOTES
@@ -0,0 +1,73 @@
+An overview of steps required to switch to a new GCC version.
+
+1. Get the MinGW build of this GCC version and get configuration
+ flags (gcc -v). The idea is to build both the cross-compiler
+ and the native compiler (with linked-in ODB plugin) as close
+ to the MinGW configuration as possible.
+
+2. Build the cross-compiler:
+
+ 1. Backup old cross/mingw to cross/mingw-X.Y.Z.
+ 2. Cleanup old GCC files from cross/mingw.
+ 3. Unpack GCC, rename to gcc-cross, create or clean gcc-cross-build.
+ 4. Adapt older gcc-X.Y.Z-mingw-cross.patch (--dry-run) and apply.
+ 5. Adapt gcc-cross-configure.
+ 6. Build & install:
+
+ cd gcc-cross-build
+ ../gcc-cross-configure
+ make -j 16
+ make install
+
+ 7. Clean up .so & .la files from cross/mingw/lib/gcc/i686-mingw/X.Y.Z
+ (we still seem to have to build with --enable-shared for exceptions
+ to work).
+ 8. Check that the compiler works. Compile and run sizeof_funds.cxx and
+ throw.cxx. There should be no auto-importing (see step 7).
+
+3. Build the native compiler:
+
+ 1. Unpack GCC, rename to gcc, create or clean gcc-build.
+ 2. Adapt older gcc-X.Y.Z-mingw.patch (--dry-run) and apply.
+ 3. Adapt older gcc-X.Y.Z-static-plugin.patch (--dry-run) and apply.
+ This step will probably require careful review of changes in the
+ plugin code (plugin.h and plugin.c).
+ 4. Regenerate configure script in gcc/gcc/. Use the same autoconf
+ version as in the original (see ~/build/autocond-X.Y). For example:
+
+ sudo make -C ~/build/autoconf-2.64 install
+ autoconf --version
+ cd gcc
+ autoconf
+ sudo make -C ~/build/autoconf-2.64 uninstall
+
+ 4. Adapt gcc-configure.
+ 5. Configure and make GCC manually:
+
+ export PATH=`pwd`/cross/mingw/bin:$PATH
+ cd gcc-build
+ ../gcc-configure
+ make -j 16
+
+ This step will fail due to lack of libplugin-stub.a. That's
+ ok. Copy .h and .def files from gcc-build/gcc/ to gcc-headers/
+ (backup old ones).
+
+4. Run the build-dist script with -rebuild
+
+ 1. If GCC build fails, then it can be re-configured or re-made
+ directly from the gcc-build directory provided you don't
+ clean it up (if you do so, you can manually copy libplugin-stub.a
+ to gcc-build/gcc/).
+
+ 2. Check the package for any stray directories/files.
+
+ 3. On Windows, check that:
+
+ - Compiler, including exceptions, work. Compile and run sizeof_funds.cxx
+ and throw.cxx.
+
+ - Make sure ODB runs, including throwing exceptions (run on object
+ with private data members).
+
+5. Copy updates/patches to odb/etc/.