Skip to content

Commit

Permalink
Fix #2415, use correct object extension in table build
Browse files Browse the repository at this point in the history
Do not assume ".o" for object files, use ${CMAKE_C_OUTPUT_EXTENSION}
  • Loading branch information
jphickey committed Jul 26, 2023
1 parent a8b20ac commit 0900e5d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions cmake/arch_build.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,7 @@ function(add_cfe_tables TABLE_FQNAME TBL_DEFAULT_SRC_FILES)
-DOUTPUT_FILE="${TABLE_RULEFILE}"
-DTABLE_NAME="${TABLE_BASENAME}"
-DSOURCES="${TBL_SRC}"
-DOBJEXT="${CMAKE_C_OUTPUT_EXTENSION}"
-P "${TABLE_GENSCRIPT}"
WORKING_DIRECTORY
${WORKING_DIRECTORY}
Expand Down
2 changes: 1 addition & 1 deletion cmake/tables/elf2cfetbl_rules.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Rule for traditional CFE table generation via elf2cfetbl

elf/%.o:
elf/%:
@mkdir -pv $(dir $(@))
cd $(dir $(@)) && $(AR) x $(abspath $(<)) $(notdir $(@))
2 changes: 1 addition & 1 deletion cmake/tables/generate_elf_table_rules.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ set(TABLE_RULES)
foreach(TBL_SRC ${SOURCES})

get_filename_component(DEP_FILE ${TBL_SRC} NAME)
set(DEP_FILE "${TMP_DIR}/${DEP_FILE}.o")
set(DEP_FILE "${TMP_DIR}/${DEP_FILE}${OBJEXT}")
string(APPEND TABLE_RULES
"${DEP_FILE}: ${ARCHIVE_FILE}\n"
"${TABLE_BINARY}: ${DEP_FILE}\n"
Expand Down

0 comments on commit 0900e5d

Please sign in to comment.