Why does gcc need to the --with-newlib flag when bootstraping for LFS?How can I solve this make error when...

Kepler space telescope planets detection

How to determine the optimal threshold to achieve the highest accuracy

Finding the package which provides a given command

When does Fisher's "go get more data" approach make sense?

Do dragons smell of lilacs?

Why doesn't philosophy have higher standards for its arguments?

Sending a photo of my bank account card to the future employer

Manually select/unselect lines before forwarding to stdout

What do these three diagonal lines that cross through three measures and both staves mean, and what are they called?

What exactly is a Hadouken?

Did Voldemort kill his father before finding out about Horcruxes?

Sankhara meditation

How to delete certain lists from a nested list?

Advice for paying off student loans and auto loans now that I have my first 'real' job

Do I need a 50/60Hz notch filter for battery powered devices?

What are "full piece" and "half piece" in chess?

Can a pizza stone be fixed after soap has been used to clean it?

How should one refer to knights (& dames) in academic writing?

(Piano) is the purpose of sheet music to be played along to? Or a guide for learning and reference during playing?

Intel 8080-based home computers

If I stood next to a piece of metal heated to a million degrees, but in a perfect vacuum, would I feel hot?

Why did Spider-Man take a detour to Dorset?

Is it ethical for a company to ask its employees to move furniture on a weekend?

how many bits in the resultant hash will change, if the x bits are changed in its the original input



Why does gcc need to the --with-newlib flag when bootstraping for LFS?


How can I solve this make error when building gcc-4.7.2 for LFS?Why binutils and gcc need to install twice in LFS?Why is the C++ Library not disabled when building GCCBuilding a custom development environmentGCC 5.1.0 fails to compile following the LFS guide — pass 2; linking errors?LFS 7.10 - why am I getting an error when using make command for expect-5.45Why does GCC stop working?Why LFS and CLFS change the path used to find the dynamic linker?Error when chrooting with LFSWhy am I receiving make errors when trying to compile GCC?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















When building the first pass of GCC in Linux From Scratch, it says to pass the --with-newlib flag because




"Since a working C library is not yet available, this ensures that the inhibit_libc constant is defined when building libgcc. This prevents the compiling of any code that requires libc support."




Why is this? Why is either LFS or GCC broken? According to the actual gcc instructions, --with-newlib doesn't do anything like that, only telling GCC you're using newlib




"Specifies that ‘newlib’ is being used as the target C library. This causes __eprintf to be omitted from libgcc.a on the assumption that it will be provided by ‘newlib’."




Whats going on? Is LFS fundmentally broken and doing it wrong(Besides the fact that it uses a sub-directory in the gcc source for building, which is explicitly unsupported by GCC..), or is GCC fundamentally broken and unable to be bootstrapped by actually doing something silly like following it's documentation?



If LFS is doing it wrong, whats the correct way to build a native GCC/binutils toolchain isolated from the host system



If GCC is wrong, well i guess i'm(and everyone else) is just out of luck for building it by doing something ridiculous like "following the directions", which kinda sucks.










share|improve this question







New contributor



user362679 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • I don't know what LFS is, but --use-newlib may be a trick since inhibit_libc is only defined when a) newlib is used or b) building a cross-compiler (host != target). But what if you want to build something like a cross-compiler, but for an identical target to the one you run on?

    – mosvy
    17 mins ago




















1















When building the first pass of GCC in Linux From Scratch, it says to pass the --with-newlib flag because




"Since a working C library is not yet available, this ensures that the inhibit_libc constant is defined when building libgcc. This prevents the compiling of any code that requires libc support."




Why is this? Why is either LFS or GCC broken? According to the actual gcc instructions, --with-newlib doesn't do anything like that, only telling GCC you're using newlib




"Specifies that ‘newlib’ is being used as the target C library. This causes __eprintf to be omitted from libgcc.a on the assumption that it will be provided by ‘newlib’."




Whats going on? Is LFS fundmentally broken and doing it wrong(Besides the fact that it uses a sub-directory in the gcc source for building, which is explicitly unsupported by GCC..), or is GCC fundamentally broken and unable to be bootstrapped by actually doing something silly like following it's documentation?



If LFS is doing it wrong, whats the correct way to build a native GCC/binutils toolchain isolated from the host system



If GCC is wrong, well i guess i'm(and everyone else) is just out of luck for building it by doing something ridiculous like "following the directions", which kinda sucks.










share|improve this question







New contributor



user362679 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




















  • I don't know what LFS is, but --use-newlib may be a trick since inhibit_libc is only defined when a) newlib is used or b) building a cross-compiler (host != target). But what if you want to build something like a cross-compiler, but for an identical target to the one you run on?

    – mosvy
    17 mins ago
















1












1








1








When building the first pass of GCC in Linux From Scratch, it says to pass the --with-newlib flag because




"Since a working C library is not yet available, this ensures that the inhibit_libc constant is defined when building libgcc. This prevents the compiling of any code that requires libc support."




Why is this? Why is either LFS or GCC broken? According to the actual gcc instructions, --with-newlib doesn't do anything like that, only telling GCC you're using newlib




"Specifies that ‘newlib’ is being used as the target C library. This causes __eprintf to be omitted from libgcc.a on the assumption that it will be provided by ‘newlib’."




Whats going on? Is LFS fundmentally broken and doing it wrong(Besides the fact that it uses a sub-directory in the gcc source for building, which is explicitly unsupported by GCC..), or is GCC fundamentally broken and unable to be bootstrapped by actually doing something silly like following it's documentation?



If LFS is doing it wrong, whats the correct way to build a native GCC/binutils toolchain isolated from the host system



If GCC is wrong, well i guess i'm(and everyone else) is just out of luck for building it by doing something ridiculous like "following the directions", which kinda sucks.










share|improve this question







New contributor



user362679 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











When building the first pass of GCC in Linux From Scratch, it says to pass the --with-newlib flag because




"Since a working C library is not yet available, this ensures that the inhibit_libc constant is defined when building libgcc. This prevents the compiling of any code that requires libc support."




Why is this? Why is either LFS or GCC broken? According to the actual gcc instructions, --with-newlib doesn't do anything like that, only telling GCC you're using newlib




"Specifies that ‘newlib’ is being used as the target C library. This causes __eprintf to be omitted from libgcc.a on the assumption that it will be provided by ‘newlib’."




Whats going on? Is LFS fundmentally broken and doing it wrong(Besides the fact that it uses a sub-directory in the gcc source for building, which is explicitly unsupported by GCC..), or is GCC fundamentally broken and unable to be bootstrapped by actually doing something silly like following it's documentation?



If LFS is doing it wrong, whats the correct way to build a native GCC/binutils toolchain isolated from the host system



If GCC is wrong, well i guess i'm(and everyone else) is just out of luck for building it by doing something ridiculous like "following the directions", which kinda sucks.







gcc lfs






share|improve this question







New contributor



user362679 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question







New contributor



user362679 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question






New contributor



user362679 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 1 hour ago









user362679user362679

61 bronze badge




61 bronze badge




New contributor



user362679 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




user362679 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • I don't know what LFS is, but --use-newlib may be a trick since inhibit_libc is only defined when a) newlib is used or b) building a cross-compiler (host != target). But what if you want to build something like a cross-compiler, but for an identical target to the one you run on?

    – mosvy
    17 mins ago





















  • I don't know what LFS is, but --use-newlib may be a trick since inhibit_libc is only defined when a) newlib is used or b) building a cross-compiler (host != target). But what if you want to build something like a cross-compiler, but for an identical target to the one you run on?

    – mosvy
    17 mins ago



















I don't know what LFS is, but --use-newlib may be a trick since inhibit_libc is only defined when a) newlib is used or b) building a cross-compiler (host != target). But what if you want to build something like a cross-compiler, but for an identical target to the one you run on?

– mosvy
17 mins ago







I don't know what LFS is, but --use-newlib may be a trick since inhibit_libc is only defined when a) newlib is used or b) building a cross-compiler (host != target). But what if you want to build something like a cross-compiler, but for an identical target to the one you run on?

– mosvy
17 mins ago












0






active

oldest

votes














Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






user362679 is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f530546%2fwhy-does-gcc-need-to-the-with-newlib-flag-when-bootstraping-for-lfs%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








user362679 is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















user362679 is a new contributor. Be nice, and check out our Code of Conduct.













user362679 is a new contributor. Be nice, and check out our Code of Conduct.












user362679 is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f530546%2fwhy-does-gcc-need-to-the-with-newlib-flag-when-bootstraping-for-lfs%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

Ciclooctatetraenă Vezi și | Bibliografie | Meniu de navigare637866text4148569-500570979m