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

Update Makefile.am #1553

Merged
merged 1 commit into from
Sep 12, 2017
Merged

Update Makefile.am #1553

merged 1 commit into from
Sep 12, 2017

Conversation

vpereira
Copy link
Contributor

add SECCOMP_CFLAGS to the Makefile.am file

IMPORTANT:

Do we have to check if SECCOMP is enabled? We have checks if libyaml and libxml are enabled but not for SECCOMP.

add SECCOMP_CFLAGS to the Makefile.am file
@coveralls
Copy link

Coverage Status

Coverage remained the same at 85.941% when pulling ef6a4d9 on vpereira:master into 2a35ca6 on universal-ctags:master.

@masatake
Copy link
Member

IMPORTANT:

Do we have to check if SECCOMP is enabled? We have checks if libyaml and libxml are enabled but not for SECCOMP.

??? Are you talking about the availability of seccomp in build-environment?
If yes, it is already checked in configure.ac.

Or are you talking about the advertising the feature availablity in ctags itself?
If yes, it is already done with --list-features option:

[yamato@master]/tmp% u-ctags --list-features
u-ctags --list-features
#NAME             DESCRIPTION
aspell            linked with code for spell checking (internal use)
debug             TO BE WRITTEN
interactive       accepts source code from stdin
json              supports json format output
multibyte         TO BE WRITTEN
option-directory  TO BE WRITTEN
regex             can use regular expression based pattern matching
sandbox           linked with code for system call level sandbox
wildcards         can use glob matching
xpath             linked with library for parsing xml input
yaml              linked with library for parsing yaml input

sandbox is for seccomp.

Anyway I will merge this PR. Thank you.

@masatake masatake merged commit c37967d into universal-ctags:master Sep 12, 2017
@vpereira
Copy link
Contributor Author

vpereira commented Sep 12, 2017

I was talking to have something

if HAVE_SECCOMP
  add_seccomp_header
  add_seccomp_lib 

because you can pass to configure --disable-seccomp and it may or may not explode if we try unconditionally to add seccomp headers and lib

@masatake
Copy link
Member

Oh, I see you are talking about conditions in Makefile.am.

Adding source files and header files are guarded with if condition like:

if HAVE_LIBYAML
PARSER_SRCS += $(YAML_SRCS)
PARSER_HEADS += $(YAML_HEADS)
endif

You may wonder why no 'if HAVE_SECCOMP'.

This is o.k. seccomp.o can be linked always because secomp.c itself has big ifdef block.
seccomp.c provides a stub if no libseccomp is available.
See seccomp.c.

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