Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Please pull build improvements (and one code fix) from master#22

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
kevin-dot-pyle wants to merge14 commits intodavidmalcolm:master
base:master
Choose a base branch
Loading
fromkevin-dot-pyle:master

Conversation

@kevin-dot-pyle
Copy link

This pull request covers various build system improvements and one minor bug fix in the generated C code.

Build system:

  • Mark some fake targets as PHONY to improve make handling
  • Support compiling a plugin for a gcc other than the compiler used to build the plugin. Commitb4d2623 provides this for cross-compilers of the same version as the build compiler. Commitc33eb32 makes this work if the host system cannot run output from the cross-compiler. Commit1b44a06 extends this to allow compiling the plugin to run in a major version of gcc other than the one used to build it (e.g. build using gcc 4.8 to run in gcc 4.9, whether cross or native).
  • Direct invocation of g++ when appropriate, rather than using gcc -x c++. This allows the Makefile to pass CXXFLAGS when needed, rather than passing CFLAGS to the C++ compiler.
  • Parallel build fix: avoid competing runs of xml-to-h.py in parallel builds.
  • Parallel build fix: ensure top level generated files used by gcc-c-api are generated before recursing into gcc-c-api, which assumes they will be present and has no rules to generate them.

Generated code bug fix:

  • Using nullable_ptr caused a docstring of None to be converted into(char)"NULL"* in the generated C code, thereby documenting the object with the word NULL. Commit650ae20 changes the code to instead generate an unquoted NULL, so that the object is recorded as having no documentation.

Kevin Pyle added14 commitsJune 4, 2014 21:50
Ensure that 'make install' works even if a file named 'install' exists.
Ensure that 'make install' works even if a file named 'install' exists.
Set PLUGIN_NAME from $PYTHON so that multi-Python builds do not collide.
This allows compiling a gcc-python-plugin to run in the context of across-compiler.  Using the cross-compiler to build gcc-python-pluginwould produce a plugin that cannot be loaded on the host system.
Replace "cp && sed -i" with "sed >", so that the file is written withthe desired values on the first pass.  Using a single sed reduces thenumber of processes and the number of complete file rewrites.
Use $(MAKE) to run the same make even when it is not named 'make' or isnot first on the path.  Use -C for simplicity, since the Makefilealready relies on GNU make extensions.
When GNU make is given the rule:    a b: $(DEPS)    commandThen for each target that needs an update, command will run.  If asingle run of command generates all the targets, then multiple runs areat best wasteful and at worst counterproductive if concurrent runs cancorrupt each other's output.
Change generation of print-gcc-version to preprocess, but not compile, adummy source file containing the macro GCC_VERSION, then scan theresulting output to find the numeric value of the macro.  This lets thecompiler do the work of expanding the expression, but avoids running atest program.  This is necessary for cross-compiler support, sincecross-compiled test outputs cannot be run locally.Store the output in autogenerated-gcc-version, since it is not arunnable program.
Rules in gcc-c-api assume the available ofautogenerated-EXTRA_CFLAGS.txt, so ensure it is generated beforerecursing into gcc-c-api, even in highly parallel workloads.
Generate to a temporary name, so that a failure in the script does notleave behind an up-to-date incomplete file.  If the script exitssuccessfully, then rename the file to its proper name.
Use $(filter-out) to eliminate autogenerated-casts.c from the generalrecipe, so that make does not warn when it encounters a specific recipefor autogenerated-casts.c.
Add a convenience function that knows not to quote the keyword NULL.
Instead of passing the contents of autogenerated-EXTRA_CFLAGS.txt on thegcc command line, read it in and use it to decide whether to run gcc org++.  This also produces a cleaner failure mode ifautogenerated-EXTRA_CFLAGS.txt has an unexpected value.
Rename GCC_VERSION to TARGET_GCC_VERSION in source files.  Add a commandline preprocessor definition setting TARGET_GCC_VERSION to the value ofthe file autogenerated-gcc-version, which contains the effectiveGCC_VERSION of TARGET_GCC.
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

@kevin-dot-pyle

[8]ページ先頭

©2009-2025 Movatter.jp