Commit graph

174 commits

Author SHA1 Message Date
Mark Jansen 18e95f5a4e
[CMAKE] Store and re-use M4 and BISON_PKGDATADIR env variables
ROSBE-174
2021-05-22 16:38:17 +02:00
Jérôme Gardou 8d1e01be0e [NLS] Use files provided by Microsoft to generate most of our NLS files
Instead of binary blobs coming from who-knows-where
CORE-17571
2021-05-19 22:50:29 +02:00
Jérôme Gardou 0f723105c6 [CMAKE] Allow compiling amd64 port with GCC on Windows
Dedicated to Daniel
2021-05-19 14:13:51 +02:00
Dmitry Borisov 6e33c8ffd3
[PEFIXUP] Fixup of resource sections in GCC builds. (#3594)
Make resource sections discardable for kernel-mode drivers and DLLs.
2021-05-10 00:36:38 +02:00
Jérôme Gardou aa51bcfbcb [CMAKE] Do not use a flag which clang doesn't know 2021-05-03 22:00:57 +02:00
Jérôme Gardou 7197620b89 [CMAKE] Always use cl to build host tools 2021-05-03 22:00:57 +02:00
Jérôme Gardou ec68a3311f [CMAKE] Use SEH exceptions for c++ in clang amd64 build 2021-05-03 22:00:57 +02:00
Jérôme Gardou b52ab2493b Revert "[CMAKE] Disable SSE instruction on GCC amd64 builds"
The right fix is to ensure that the stack is properly 16-bit aligned
This reverts commit 63944988a2.
2021-05-03 22:00:57 +02:00
Jérôme Gardou 63944988a2 [CMAKE] Disable SSE instruction on GCC amd64 builds
Except for user-mode modules
2021-04-28 13:10:23 +02:00
Jérôme Gardou ba74a05a17 [PSEH] Add implementation for GCC amd64
Also, put include directory next to the library and use
target_include_directories(.. INTERFACE ..) to get this right.
This is because :
 - Having includes & implementation in two different places buggers me
 - This makes sure that there is no "if it compiles everything is fine" behaviour from anyone
   because now even static libraries need it for GCC amd64 build
Also add __USE_PSEH2__ define for the non SEH-aware compilers out there and use it in a few headers
where we define macros involving __try
2021-04-28 13:10:23 +02:00
Jérôme Gardou 37bc01f42b [CMAKE] Introduce a GCC plugin for helping with amd64 SEH implementation
\#pragma REACTOS SEH(except)
\#pragma REACTOS SEH(finally)
What it does is counting the number of SEH __try blocks and emit the proper assembly statements at function prologue
It also checks for mixing C++ & SEH exception handling, which wouldn't work
2021-04-28 13:10:23 +02:00
Jérôme Gardou 97a8953538 [CMAKE:GCC] Enforce file alignment on driver & kernel images 2021-04-28 13:10:23 +02:00
Jérôme Gardou 9ef5a7eb7a [CMAKE] Fix compilation with newer windres versions
Also use clang as preprocessor when using it
Also, use *our* headers instead of the platform ones
2021-04-27 11:54:12 +02:00
Serge Gautherie c41007624f [CMAKE] config.cmake: Fix 'STEQUAL' typo, in a comment
Addendum to e90b6bb.
2021-04-27 10:36:54 +03:00
Victor Perevertkin d10728a645
[CMAKE] Rely less on CMAKE_BUILD_TYPE variable
Having conditional statements with CMAKE_BUILD_TYPE is an antipattern
See https://stackoverflow.com/questions/66079007/having-conditional-statements-on-build-type-variable-a-good-design

We use both single- and multi-config generators (Ninja and VS), so we
can't really rely on CMAKE_BUILD_TYPE, because it's not always set.

This commit alters some conditional flags to use <$CONFIG:...>
generator expression, but is still not complete. Also, our default
optimization level (4) now has what was always a de-facto flags
2021-04-15 06:44:56 +03:00
Victor Perevertkin 72ad37c1cd
[CMAKE] Unify configs for architectures
config*.cmake files are constantly getting out of sync between
each other. Besides that, the parameters are not really dependent
on a target architecture, but rather on a compiler (except *ARCH)

This approach seems to be more future-prone, and allows to see
all the options in one file (there are really not that many of them)
2021-04-15 06:44:52 +03:00
Serge Gautherie 8ddbfdeb57 [BOOTDATA][CMAKE] Sort 2 directories out
winsxs\x86_reactos.newapi_6595b64144ccf1df_1.0.0.0_none_deadbeef:
removed: silently added on 8d30456 and never used.

bin\suppl:
moved: to 60 from 80.
2021-04-12 17:40:18 +02:00
Jérôme Gardou 76a241dea6 [CMAKE] Also set GCC/CLANG variables on amd64 builds 2021-04-09 12:35:30 +02:00
Jérôme Gardou 83e1afe12a [CMAKE] Do not call clang with unsupported arguments 2021-04-09 10:09:55 +02:00
Victor Perevertkin c7d1ff4a9d [SDK][NDK] Fix clang 12 compilation 2021-04-09 03:51:32 +03:00
Mark Jansen 2587d72ef7 [WINSXS] Add some amd64 manifests
Co-authored-by: Timo Kreuzer <timo.kreuzer@reactos.org>
2021-04-08 20:48:24 +03:00
Jérôme Gardou 9c4ae0d05e [CMAKE] Honor CMAKE_EXE_LINKER_FLAGS_INIT in GCC build 2021-04-06 19:26:33 +02:00
Jérôme Gardou f5bace8536 [CMAKE] Move toolchain specific handling to set_module_type_toolchain
+ style fixes
2021-03-23 11:18:43 +01:00
Jérôme Gardou 5c21460680 [CMAKE] Put .rsrc section after the INIT section on drivers, like link.exe does 2021-03-23 11:18:43 +01:00
Jérôme Gardou e55123a6a2 [CMAKE] Add the kernel module type
Take this as an occasion to use target_link_options more
2021-03-23 11:18:43 +01:00
Jérôme Gardou 812c9e5a11 [CMAKE] Fixup of driver sections in GCC builds
Also introduce a helper variable to list KMode modules
2021-03-23 11:18:43 +01:00
Jérôme Gardou 5489efcb1a [SDK:TOOLS] Add --driver option to pefixup
For now, this adds IMAGE_SCN_MEM_DISCARDABLE to the INIT section, and IMAGE_SCN_MEM_NOT_PAGED to sections which are not named PAGE or .reloc
2021-03-23 11:18:43 +01:00
Jérôme Gardou 56b1baa3dd [CMAKE] Restore using LD linker script with GCC 2021-03-23 11:18:43 +01:00
Jérôme Gardou 6445f33704 [CMAKE] Put INIT section before .reloc and not after.
CORE-14683
2021-03-23 11:18:43 +01:00
Jérôme Gardou 49286a6225 [CMAKE] Get rid of add_object_library
It's not needed anymore
2021-03-03 08:34:32 +01:00
Jérôme Gardou c68739e566 [CMAKE] Preprocess the ASM files but let msbuild handle their actual compilation
CORE-17423
2021-03-03 08:34:32 +01:00
Jérôme Gardou 41130ab5c6 [CMAKE] Use ASM_MASM language when building with MSVC toolchain
CORE-17423
2021-03-03 08:34:32 +01:00
Mark Jansen 35103558e1
[CMAKE] Fix empty dependencies.graphml being created 2021-02-07 14:02:01 +01:00
Hervé Poussineau ebb7088b02 [CMAKE] Remove unused variables _ELF_
This is not used anymore since r55855 (818418643e)
2021-02-04 11:14:59 +01:00
Victor Perevertkin 5375e33490
[CMAKE] Generate Flex and Bison files at build time
We have Flex and Bison distributed along with RosBE 2.2 so this should
not be a problem
2021-01-28 06:43:05 +03:00
Mark Jansen b1bf3aae50
[CMAKE] Fix host-tools path for MSVC IDE 2021-01-08 21:12:11 +01:00
Hervé Poussineau 39545c3385 [CMAKE] Use -Wno-error when compiling with GCC x64 2021-01-05 14:19:45 +01:00
Jérôme Gardou c8d07514c8 [CMAKE] Fix GCC -fstack-protector usage 2021-01-05 13:38:57 +01:00
Victor Perevertkin edb425d89e
[CMAKE] Use consolidated registry.inf for generating SETUPREG.HIV
This way all registry data generated by add_registry_inf goes there.
SETUPREG.HIV increased by about 12KiB after that
2021-01-04 16:50:32 +03:00
Victor Perevertkin e394a1312a
[CMAKE] Replace CMAKE_AR with CMAKE_LINKER /LIB for msvc
Render the command to a variable for dealing with quotes properly

Addendum to ca1b2ada34 and b96e88894a
2021-01-03 04:06:51 +03:00
Victor Perevertkin ca1b2ada34
[CMAKE] Replace DIVISION_SLASH unicode character with SOLIDUS
This fixes the build on some machines. In addition, replace
the hardcoded "LINK /LIB" with ${CMAKE_AR}

Addendum to b96e88894a
2021-01-03 03:46:12 +03:00
Jérôme Gardou b96e88894a [CMAKE] Turn import libs into regular C static libs
Embed msvcrtex into libmsvcrt

Idea taken from Thomas Faber
2020-12-28 12:13:30 +01:00
Jérôme Gardou 56e56f8ecc [CMAKE] Use -fcommon when using CLang 2020-12-28 12:13:30 +01:00
Victor Perevertkin 6bab72f69a
[CMAKE] Fix RUNTIME_CHECKS dependent option
Addendum to 92dfec219d and a2a6038e56
2020-12-14 21:09:14 +03:00
Victor Perevertkin 16e5ce8fb1
[CMAKE] Use C_STANDARD property instead of command line option
Addendum to 64211aa696 and 19779b3f96
2020-12-05 15:35:06 +03:00
Hervé Poussineau 4469ab3620 [CMAKE] Disable compression of debug sections in GCC <= 7.0
We use MSVC, Clang or GCC > 7.0 these days.
2020-12-01 18:44:53 +01:00
Jérôme Gardou f54c7b646c [VMAKE/WIDL] Properly fix build (try 3) 2020-11-20 19:57:48 +01:00
Jérôme Gardou 72d9471424 [CMAKE] Fix host tools dependency tracking 2020-11-20 19:57:48 +01:00
Jérôme Gardou 8297109b95 [CMAKE/WIDL] Fix build (try 2) 2020-11-20 10:17:43 +01:00
Jérôme Gardou acfff0919e [CMAKE/WIDL] Fix build 2020-11-20 10:12:31 +01:00