-
Notifications
You must be signed in to change notification settings - Fork 132
optional Library option dot_a_linkage not taken into account #1126
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
Comments
I'm impressed with your research :-) But the makefile generator processes according to the extentionpoint org.eclipse.cdt.managedbuilder.core.buildDefinitions In that extentionpoint you will see that there is a definition for archived links AR_OBJ inputs that states the output is .o (for C C++ and assembly) The same AR_OBJ is then available for input and again tagged as .o files. It could be that simply changing the o to a or ar in the input type definition solves your issue. But it will do so for all cases so that would need extensive testing. For which there is a junit test :-) |
Och I think I misunderstood. https://github.com/Sloeber/arduino-eclipse-plugin/blob/master/io.sloeber.core/src/io/sloeber/core/toolchain/LinkNameProvider.java#L29 |
thank you Jantje. we are on the right path. I added
in ArchieveNameProvider and the same the build is a success, but all .o files from libraries are in arduino.ar. it would be nicer if every library had own .ar |
even the Arduino builder doesn't build .ar for libraries at default. it is an option in library.properties which the library author can set from https://github.com/arduino/Arduino/wiki/Arduino-IDE-1.5:-Library-specification
|
|
after I found out about |
That would be very similar to what is there already. |
Stuff is not finished but to many changes I seperated the code for the main makefile the mksubdir and makefile mksubdir is slowly geting rewritten
Changing a header file does not trigger the needed builds
I'm not yet happy with the use of caller
I want to check in as I did lots of changes Building doesn't work anymore as the top level rules are missing
The makefile is starting to get populated
Stuff is not finished but to many changes I seperated the code for the main makefile the mksubdir and makefile mksubdir is slowly geting rewritten
Changing a header file does not trigger the needed builds
Though not everything is used (and probably I will not use it) and most of it doesn't work; I'm checking it in to avoid lost work.
Expanding the dependency command in MakeRule int the make way makes the dependency files 100% compatible between the internal and make builder.
needs code activation and testing to be completed but I need Sloeber for that.
Also persistency works The libs are not yet added to the command line
Supporting the managed build way will not work with this class.
I needed a sorting for the regression tests
Because now the build/discovery commands are run by cmd on windows the workarounds had to be completely different.
…ary_archives #1126 support for creating library archives
This id finally fixed in the nightly. |
@jantje |
I should call it actions instead of nightly. |
The build invokes linker with the .o from from libraries. This creates a different build result then invoking the linker with .a or .ar files for libraries, because files listed on linker command line are 'starting points' of compilation while objects from archives are added only if they are required by .o files from linker command line.
To reproduce, build for AVR the ImprovedKeyboard example of HID-Project library with Arduino IDE and with Sloeber. Then compare the size. Generate a .map file and you will see that the elf file created by Sloeber includes classes for all HID devices of the library while the elf file build by ArduinoIDE only contains the ImprovedKeyboard. (Additional problem is that in the sketch built by Sloeber all singeltons for HID devices are present and register themselves as USB endpoints, but there is space only for 3 endpoints. NicoHood/HID#199)
The build process should create archives (.a or .ar) for libraries and then add this archives on linker command line instead of listing the .o files.
To fix this, the makefile generation must be enhanced. I have Sloeber running from source code for debugging. I see that the makefile system is adaptation of the CDT makefile system, but before going deeper I thought I open an issue to discuss this.
The text was updated successfully, but these errors were encountered: