Port build system to CMake (2/2 from #5)#7
Conversation
andy-shev
left a comment
There was a problem hiding this comment.
Now you can drop the first part of the PR and rebase it against current master/main.
|
Also, please address the comments I have given in #5. |
Calling --make-links assumes that iotools can be expected to run on the host architecture, despite the project intending to support native and cross-compilation equally well. Signed-off-by: Aaron Sierra <aaron@bubbl-tek.com>
a706de3 to
3c878c3
Compare
I've rebased to account for the merge commit. |
If you are referring to these discussions, I await further comment from you:
|
Hmm... Maybe I don't understand something. There two comments from me and no replies from you. Can you elaborate what I should do / write? |
I'd left my comments "Pending" 🤦 They should be visible to you, now. |
3c878c3 to
36fdbfc
Compare
|
The current version implements changes discussed here:
|
andy-shev
left a comment
There was a problem hiding this comment.
Some minor comments, but overall looks good to me.
The DEBUG make variable is replaced by CMAKE_BUILD_TYPE, which defaults to Debug if undefined. The Debug and Release CFLAGS are aligned with the original Makefile, all others use CMake defaults. The project's initial configuration continues to enable static-linking of iotools by default, unless overridden by "cmake -D STATIC=0". A new configurable header, config.h.in, is added to tie VER_MAJOR and VER_MINOR to the implicit PROJECT_VERSION_MAJOR and PROJECT_VERSION_MINOR variables. Signed-off-by: Aaron Sierra <aaron@bubbl-tek.com>
From https://cmake.org/cmake/help/latest/policy/CMP0065.html: CMake 3.3 and below, for historical reasons, always linked executables on some platforms with flags like -rdynamic to export symbols from the executables for use by any plugins they may load via dlopen(). CMake 3.4 and above prefer to do this only for executables that are explicitly marked with the ENABLE_EXPORTS target property. The OLD behavior of this policy is to always use the additional link flags when linking executables regardless of the value of the ENABLE_EXPORTS target property. The NEW behavior of this policy is to only use the additional link flags when linking executables if the ENABLE_EXPORTS target property is set to True. Signed-off-by: Aaron Sierra <aaron@bubbl-tek.com>
Add an INSTALL_LINKS configuration option to emulate the runtime --make-links option. It leverages a new and automatically-populated .tag field in struct cmd_info for easy lookup using readelf. The CMD_PREFIX define is set from the build script, so that the lookup mechanism has a good chance of staying in sync. Embedding the escaped code directly into CMakeLists allows us to use CMAKE_READELF (circa CMake 3.16), which isn't available from external scripts. This mechanism has been tested with readelf and llvm-readelf. Signed-off-by: Aaron Sierra <aaron@bubbl-tek.com>
36fdbfc to
cdc4725
Compare
|
@aaron-sierra Sorry, I have screwed up something. Can you create a new PR based on what's now in the master branch? The problem was that the repository has diverged in a sense of v1.8 tag and what's in the master. I synced it, but it produced two similar merge commits (of v1.8). So I reset the master to v1.8 to start over. |
Nope that won't work, your repo has the same issue mine had. You need to be sure that you have commit 3abdb69 in your repo. For this you need to run |
This is a redo for #7, requested in #7 (comment).

This is the second half of #5 and, therefore, depends on #6 which ends with the version 1.8 bump.
These changes include:
iotools --make-linksduring install.Buildroot package reference files
Config.in
iotools.mk