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

Fix various errors found during LTO build #23

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

Thaodan
Copy link
Contributor

@Thaodan Thaodan commented Sep 10, 2023

Also fix out of tree builds when trying to find scratchbox2_version.h

Contains #22.

@Thaodan Thaodan force-pushed the lto_and_various_build_fixes branch 2 times, most recently from bb29f77 to 58f5e84 Compare September 10, 2023 14:10
@Thaodan Thaodan force-pushed the lto_and_various_build_fixes branch 5 times, most recently from 5c882e1 to 59d6b80 Compare March 29, 2024 02:33
@Thaodan Thaodan force-pushed the lto_and_various_build_fixes branch from 59d6b80 to 596ee65 Compare March 31, 2024 03:51
@Thaodan Thaodan force-pushed the lto_and_various_build_fixes branch 2 times, most recently from 905364e to 2829179 Compare April 10, 2024 09:28
@Thaodan Thaodan force-pushed the lto_and_various_build_fixes branch from 2829179 to a4b8681 Compare April 26, 2024 14:46
i_virtualize_struct_statx was only implicitly defined in
vterm_statfuns.c as config.h which defines HAVE_STATX wasn't included.
Consistently include config.h before any other header to avoid issues
like these:
preload/vperm_filestatgates.c: In function ‘statx_gate’:
preload/vperm_filestatgates.c:272:17: error: implicit declaration of function ‘i_virtualize_struct_statx’; did you mean ‘i_virtualize_struct_stat’? [-Wimplicit-function-declaration]
  272 |                 i_virtualize_struct_statx(realfnname, buf);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~
      |                 i_virtualize_struct_stat

Also use consistent include order and naming in all files.

Fixes: 0ecaef5 ([sb2] Add gate for statx. JB#49501)
Signed-off-by: Björn Bidar <[email protected]>
include/elf.h:25:14: error: expected ‘;’ before ‘typedef’
   25 | __BEGIN_DECLS
      |              ^
      |              ;

Fixes: 055cb96 (Incomplete OS X support)
Signed-off-by: Björn Bidar <[email protected]>
Fixes errors such as:
include/rule_tree.h:22:9: error: unknown type name ‘uint32_t’
   22 | typedef uint32_t ruletree_object_offset_t;

Signed-off-by: Björn Bidar <[email protected]>
preload/vperm_statfuncts.c:122:5: warning: no previous prototype for ‘i_virtualize_struct_stat_internal’ [-Wmissing-prototypes]
 122 | int i_virtualize_struct_stat_internal(

Signed-off-by: Björn Bidar <[email protected]>
@Thaodan Thaodan force-pushed the lto_and_various_build_fixes branch 2 times, most recently from dca0f9e to 10580b1 Compare October 28, 2024 09:42
Previously in some instance the assumption was $(SRCDIR) = $(OBJDIR).
If $(OBJDIR) isn't equal to $(SRCDIR) these files were not found anymore.

Signed-off-by: Björn Bidar <[email protected]>
Resolves error when using a compiler with stricter settings such as
when using LTO.

Signed-off-by: Björn Bidar <[email protected]>
Both open and openat load their last argument 'mode' lazily, using
va_arg() only if O_CREAT is found in oflag. This is wrong, mode is also
necessary if O_TMPFILE is in oflag.

Adapt __OPEN_NEEDS_MODE(oflag) present since glibc 2.22 to solve the
issue.

Read more down below:
https://sourceware.org/git/?p=glibc.git;a=commit;h=65f6f938cd562a614a68e15d0581a34b177ec29d

Signed-off-by: Björn Bidar <[email protected]>
Once in autogen.sh and once in %make

Signed-off-by: Björn Bidar <[email protected]>
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.

1 participant