Post B5UfcZGiFevUehYsMq by thephd@pony.social
 (DIR) More posts by thephd@pony.social
 (DIR) Post #B5UfcZGiFevUehYsMq by thephd@pony.social
       1 likes, 0 repeats
       
       How do I get the damn g++/gcc I get from make install to be properly debuggable? This shit is atrocious to step through, jumping all over the damn place and optimizing out all the fucking variables.
       
 (DIR) Post #B5Ug12pZzVBvI8XdpI by thephd@pony.social
       1 likes, 0 repeats
       
       Is the BOOT_CFLAGS, STAGE1_CFLAGS, etc... variables from the building/installing instructions outdated??? WHy is everything building with -g -O2???
       
 (DIR) Post #B5Ug23diTC8S5aTYa8 by zygoon@fosstodon.org
       0 likes, 0 repeats
       
       @thephd how to build gcc from scratch so that the (final) result does not depend on host libc, host ld.so? Is that kernel headers with host compiler, libc with host compiler, binutils with host compiler, gcc, and then with the new compiler, repeat the process?The goal is to bootstrap minimal C compiler without having to worry about host ABI / files in the endSorry to steal your thread, this just prompted me that this is something I find confusing and you seem to know this bit well.
       
 (DIR) Post #B5Ug37pMNwfJMoQmtU by thephd@pony.social
       1 likes, 0 repeats
       
       ooOOoOOooooh working on this makes me so, SO fucking mad.
       
 (DIR) Post #B5UgbWN5daRXKobpSq by malwareminigun@infosec.exchange
       0 likes, 0 repeats
       
       @thephd is -g -O2 not the most reasonable shipping settings?
       
 (DIR) Post #B5UgcXrPaR8CF6HQyO by thephd@pony.social
       0 likes, 0 repeats
       
       IT'S *_CXXFLAGS AND NOT JUST *_CFLAGS?!I should've never trusted the damn documentation always just read the source code fuck this noise
       
 (DIR) Post #B5Ugr5iOVrs3IKzy9A by madduci@mastodon.social
       0 likes, 0 repeats
       
       @thephd always has been
       
 (DIR) Post #B5Uh1yfD4POebvhSOe by bnlandor@mastodon.social
       0 likes, 0 repeats
       
       @thephd Pretty sure at some point the documentation was correct…
       
 (DIR) Post #B5Uh3Ae20iQK3hiYpk by thephd@pony.social
       0 likes, 0 repeats
       
       @madduci It hasn't always been! That's the point!!!https://gcc.gnu.org/install/build.html
       
 (DIR) Post #B5UhEHCtx577b5K7hg by thephd@pony.social
       1 likes, 0 repeats
       
       Conceptually of COURSE this makes sense because GCC switched to using C++  Y E A R S ago but like, I was following the documentation! I was sticking to what they told me to set and deleting build dirs and reconfiguring like a good boy!!I SHOULD'VE JUST READ THE MAKEFILES FROM THE START.LIES LIES LIES LIES LIES LIES LIES LIES LIES LIESLIES https://gcc.gnu.org/install/build.html LIESLIES LIES LIES LIES LIES LIES LIES LIES LIES LIES
       
 (DIR) Post #B5UhKG11IN3FdfcNBw by abraxas3d@mastodon.radio
       0 likes, 0 repeats
       
       @thephd Misery loves company. Here you go:https://youtu.be/jYGxY5icxjc?si=VkLy3oJIhrXQZY5l
       
 (DIR) Post #B5UhLjfEY2Hzsk8H0S by sol_hsa@mastodon.gamedev.place
       0 likes, 0 repeats
       
       @thephd Code comes and goes, comments are forever.
       
 (DIR) Post #B5UhXKAx8gHiJ2Uk88 by thephd@pony.social
       1 likes, 0 repeats
       
       MORAL OF THE STORY:Documentation is for losers. Trace the binaries, read the source code, wireshark the traffic.Never be a good boy.Be a bad girl.
       
 (DIR) Post #B5UhnO7WEzLNAoY43c by thephd@pony.social
       0 likes, 0 repeats
       
       @pinskia Thanks, I'll use the wiki more often because it looks more up to date.
       
 (DIR) Post #B5Ui5bHq1jQjDl3kO0 by thephd@pony.social
       0 likes, 0 repeats
       
       @malwareminigun It is the most reasonable. I was trying to build more-debuggable binaries, though, and optimizations were happening that were rearranging conditionals and making me go crazy.I was trying to inject the right build flags and it turns out the stuff on the official website was incorrect (the wiki has a better run of it, so I probably should've started there).A lot of wasted time.
       
 (DIR) Post #B5UtfQvL8G7V0ApDIe by lanodan@queer.hacktivis.me
       0 likes, 1 repeats
       
       @thephd BEWARE: the docs lie!— /usr/share/xcb/randr.xml line 96
       
 (DIR) Post #B5UvSYeDIuL16HnpB2 by mid_kid@fosstodon.org
       0 likes, 0 repeats
       
       @thephd Your frustration is very valid, but in the future you may also want to try setting CFLAGS and CXXFLAGS in the environment before invoking configure. C build systems widely support these, and I'm pretty sure gcc initializes *_C(XX)FLAGS from these during native builds as well.
       
 (DIR) Post #B5V7TT6maCunf0Mlea by mirabilos@toot.mirbsd.org
       0 likes, 0 repeats
       
       @thephd uh but that is obvious to anyone who ever built and packaged any mixed program, CFLAGS is for C, CXXFLAGS for CFrustFrust, CPPFLAGS for both but only -[DUI]* and the likes
       
 (DIR) Post #B5VfGDqjOuWn0qiJIu by madduci@mastodon.social
       0 likes, 0 repeats
       
       @thephd you are totally right. Now that I recall it, in CMake 3.x they were correctly set as CFLAGS or CXXFLAGS depending on the language. How come that they have changes that?
       
 (DIR) Post #B5WKPvmzV2ly13iDyK by cb@social.treehouse.systems
       0 likes, 0 repeats
       
       @thephd dumb Q: does GCC also have _CPPFLAGS for the stages environment variables? i usually use that for building usually since it gets plastered for both CFLAGS and CXXFLAGS, but because it’s intended for preprocessor flags it might apply where you don’t want it
       
 (DIR) Post #B5WKPw8yBKLz7DzmEK by thephd@pony.social
       0 likes, 0 repeats
       
       @cb  not a dumb question, the exact right answer actually!! The docs said cflags but I had to change cxxflags (not cppflags) too!!
       
 (DIR) Post #B5WKU5U7OSyXFErnNI by thephd@pony.social
       0 likes, 0 repeats
       
       @mirabilos well guess who is a moron and doesn't work with "standard" mixed programs :D
       
 (DIR) Post #B5WKzr1WhAdzf2dmJU by mirabilos@toot.mirbsd.org
       0 likes, 0 repeats
       
       @thephd just inexperienced, not moron
       
 (DIR) Post #B5WL4d00GXItc2Ck2C by thephd@pony.social
       0 likes, 0 repeats
       
       @zygoon Not a clue. I don't know if that's possible but you could try reading the cross compile and ./configure help -- maybe it'll tell you how to build with a statically-bundled libc and libstdc++. I was under the impression a static build was the default.