Skip to content

Generate TOOLCHAIN file during 'build' step#12

Closed
JJL772 wants to merge 1 commit into
mdavidsaver:masterfrom
JJL772:pr-generate-TOOLCHAIN-during-build-rule
Closed

Generate TOOLCHAIN file during 'build' step#12
JJL772 wants to merge 1 commit into
mdavidsaver:masterfrom
JJL772:pr-generate-TOOLCHAIN-during-build-rule

Conversation

@JJL772

@JJL772 JJL772 commented Mar 8, 2026

Copy link
Copy Markdown
Contributor

I'm not sure if this is the correct solution, but this fixes the build rule. Prior to this change, make build and make build.linux-x86_64 would fail with:

make[3]: Entering directory '/home/jeremy/dev/epics/modules/linStat/statApp/Db/O.linux-x86_64'
make[3]: Entering directory '/home/jeremy/dev/epics/modules/linStat/statApp/src/O.linux-x86_64'
../Makefile:5: ../../../configure/O.linux-x86_64/TOOLCHAIN: No such file or directory
make[3]: *** No rule to make target '../../../configure/O.linux-x86_64/TOOLCHAIN'.  Stop.

Comment thread configure/Makefile

ifdef T_A
install: TOOLCHAIN
build: TOOLCHAIN

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@anjohnson do you agree?

fyi. The TOOLCHAIN files from Base use buildInstall:. This TOOLCHAIN file is not installed, and so maybe should be different?

@mdavidsaver

Copy link
Copy Markdown
Owner

Prior to this change, make build and make build.linux-x86_64 would fail with:

@JJL772 Out of curiosity, why not just make?

@JJL772

JJL772 commented Mar 8, 2026

Copy link
Copy Markdown
Contributor Author

For Yocto recipes the build and install steps are separate (though technically there's nothing wrong with doing all of the compilation & installing during the install step). This is pretty much the only time I use make build, otherwise I just use make or make install.some-target.

@mdavidsaver

Copy link
Copy Markdown
Owner

@JJL772 If you rebase, then the GHA runs should pass. (cf. 80db99d)

@anjohnson

Copy link
Copy Markdown
Contributor

In epics-base/configure/Makefile the TOOLCHAIN.<host>.<target> files are added to the CFG variable, which results in them being built by the inc: step that is a dependency of the build: target, so this PR is arguably more correct than the original.

However I would personally completely remove the ifdef T_A conditional and add TOOLCHAIN to TARGETS instead, like this:

diff --git a/configure/Makefile b/configure/Makefile
index d8b46c7..4bda617 100644
--- a/configure/Makefile
+++ b/configure/Makefile
@@ -7,11 +7,9 @@ CONFIGS += $(subst ../,,$(wildcard $(CONFIG_INSTALLS)))
 
 CFG += CONFIG_LINSTAT_VERSION
 
-include $(TOP)/configure/RULES
+TARGETS += TOOLCHAIN
 
-ifdef T_A
-install: TOOLCHAIN
+include $(TOP)/configure/RULES
 
 TOOLCHAIN: toolchain.cpp
        $(CXX) -E $< | grep '^LINSTAT_' > $@
-endif

@mdavidsaver

Copy link
Copy Markdown
Owner

I have applied Andrew's recommendation as 8b95403. @JJL772 does this resolve your issue?

@JJL772

JJL772 commented Mar 10, 2026

Copy link
Copy Markdown
Contributor Author

@mdavidsaver Yep, that change fixes the issue. Thanks!

@JJL772 JJL772 closed this Mar 10, 2026
@mdavidsaver

Copy link
Copy Markdown
Owner

I have tagged 8b95403 as 1.1.1, and then pushed up some new feature changes (IRQ stats and a fix for #8).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants