Skip to content

ENHANCED: Added 'c_cxx' flag and env SWIPL_CXX for packs #1293

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

kamahen
Copy link
Member

@kamahen kamahen commented Jul 5, 2024

I did a quick check of buildenv.sh when I did pack_install(.) for a pack and it appears to be correct -- SWIPL_CXX='g++' was added.

@@ -49,7 +49,7 @@ if(CMAKE_COMPILER_IS_GNUCC)
set(GCC_OPTFLAGS -O2)
endif()

set(CMAKE_C_FLAGS_DEBUG "-DO_DEBUG -DO_DEBUG_ATOMGC -O0 ${GCC_GFLAGS} $ENV{CFLAGS}"
set(CMAKE_C_FLAGS_DEBUG "-DO_DEBUG -DO_DEBUG_ATOMGC -O0 ${GCC_GFLAGS} $ENV{CFLAGS} -DO_CHECK_TERM_REFS -DSECURE_GC -DCHK_SECURE -DO_MAINTENANCE -gdwarf-2 -g3"
Copy link
Member Author

Choose a reason for hiding this comment

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

You might not agree with this change -- but it has the flags that caused #1292 when doing a debug build.

Copy link
Member

Choose a reason for hiding this comment

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

Skipped this 😄

kamahen

This comment was marked as resolved.

preferred_c_compiler(gcc).
preferred_c_compiler(clang).
preferred_c_compiler(cc).
preferred_c_compiler(path(gcc)).
Copy link
Member

Choose a reason for hiding this comment

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

I could find no good reason for the path() wrapper. has_program/2 adds this if necessary. If this fixes some issue I think it is has_program/2 that needs fixing. So, I skipped this.

Copy link
Member Author

Choose a reason for hiding this comment

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

Line 521 (program_install_prefix/1) has has_program(path(Name), EXE), ... is it wrong?

has_program/2 uses pack_build_path(...), not path(...) ... presumably the former is better?

@JanWielemaker
Copy link
Member

Applied after the mentioned changes and some documentation changes.

@kamahen kamahen deleted the cxx branch July 9, 2024 15:01
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.

2 participants