Skip to content
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

CCFLAGS override? #1

Open
saper opened this issue Feb 22, 2020 · 6 comments
Open

CCFLAGS override? #1

saper opened this issue Feb 22, 2020 · 6 comments

Comments

@saper
Copy link

saper commented Feb 22, 2020

We suggest in the instructions to override CCFLAGS like this:

./bin/package make \
    SHELL=/bin/bash CCFLAGS="-xc99 -D_XPG6 -m64 -xO4" LDFLAGS="-m64"

However, there are some places like for example lib/ast/libast/Makefile:

CCFLAGS = $(CC.SUFFIX.DEBUG:+$(CC.DEBUG)) $(CC.OPTIMIZE) $(CC.DLL)

where CCFLAGS gets overwritten anyway. If we override that, and CC.DLL is needed to be to set -fPIC and things like that we may end up in problems with linking.

I don't have a clear reproduction case for this issue right now, but I have noticed builds breaking when trying to set CCFLAGS to quell clang warnings.

@jghub
Copy link
Member

jghub commented Feb 24, 2020

@saper
thank you for this heads up. duly noted. as you might imagine, there are still things to organise/adjust in ksh-community layout/setup so far. therefore, it might take some time before someone looks into this more closely.
I also presume that there will not be a "one size fits" all recommendation for CCFLAGS settings anyway. e.g AFAICS ubuntu uses

    ./bin/package make CCFLAGS="-g -O2\
       -fdebug-prefix-map=${PWD}=.\
       -fstack-protector-strong\
       -Wformat -Werror=format-security\
       -Wdate-time -D_FORTIFY_SOURCE=2" \
        LDFLAGS="-Wl,-Bsymbolic-functions -Wl,-z,relro"

for building...

new FAQs and HOWTOs (or, generally, additional documentation) is one of the medium-term goals of ksh-community as well. so comprehensive, platform-dependent build instructions might be integrated there too if need be.

@saper
Copy link
Author

saper commented Feb 24, 2020

Sure, that's fine. I just posted it because this is what struck me reading project's README.
I'll try to post some more details here so feel free to treat it as a "note to self" bug if I may...

@jghub
Copy link
Member

jghub commented Feb 24, 2020

sure. please do. and if it is FreeBSD specific, flag it as such ;)

@saper
Copy link
Author

saper commented Feb 24, 2020

No, it is not. Can I edit issue labels?

@jghub
Copy link
Member

jghub commented Feb 24, 2020

seemingly not ... what do you want? "documentation"?

@jghub
Copy link
Member

jghub commented Feb 24, 2020

I am open to suggestions...

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

No branches or pull requests

2 participants