Tiny Core Extensions > TCE Q&A Forum

Setting up distcc

<< < (5/6) > >>

polikuo:
No, just the regular flags

--- Code: ---CFLAGS='-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe'
CXXFLAGS='-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe'
LDFLAGS='-Wl,-O1'

--- End code ---

polikuo:
OK I see the problem

You need to export the flags on the Sever machines as well.

Right before you start the daemon:

--- Code: ---tc@pi3:~$ export CFLAGS="-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe"
tc@pi3:~$ export CXXFLAGS="-march=armv8-a+crc -mtune=cortex-a72 -Os -pipe"
tc@pi3:~$ export LDFLAGS="-Wl,-O1"
tc@pi3:~$ distccd --daemon --allow 192.168.0.40 --log-file=/var/log/distccd.log

--- End code ---

Results:

--- Code: ---tc@pi4:10.2.0$ du liblto_plugin.so.0.0.0
96K     liblto_plugin.so.0.0.0
tc@pi4:10.2.0$ strip --strip-unneeded liblto_plugin.so.0.0.0
tc@pi4:10.2.0$ du liblto_plugin.so.0.0.0
76K     liblto_plugin.so.0.0.0

--- End code ---

I'll add the flags to the startup script.

polikuo:
Hi Juanito

This is the first time I compile LLVM and I'm following your instructions here.

I have a few questions, but first I spot a typo here:
The comma is gone, so nothing is passed to the linker

--- Quote ---find . -name link.txt -type f -exec sed -i 's/-Wl,-O3/-Wl -Os/g' {} \;
--- End quote ---

Anyway~
I can't find all the files listed above so I decide to "grep" my way through.
There are only 3 files containing "-O3" or "-g" flags.

--- Code: ---sed -i.orig -e 's:-Wl,-O3:-Wl,-O1:g' -e 's: -O3 : :g' -e 's: -g : :g' build.ninja CMakeCache.txt compile_commands.json
--- End code ---


--- Quote ---[libexecdir needs setting]
[-DLLVM_ENABLE_LTO=Full]

--- End quote ---
I didn't touch libexecdir and I removed LTO so jobs can be distributed.

Distcc sure helps a lot with the compile time.

--- Code: ---time ninja -j8
real    5h 38m 17s
user    16h 17m 23s
sys     44m 3.42s

--- End code ---

BTW, you can specify DESTDIR with ninja

--- Code: ---DESTDIR=/tmp/packing-llwm ninja install
--- End code ---

I'm having troubles when packing things up.
What should I do with this ?

--- Quote ---[links against ncursesw without ncursesw-dev]
--- End quote ---

What about clang ?
It looks like llvm should be packed into multiple packages and I'm not sure what are they.

P.S. I'm pretty sure -Wl,-O[1-9] is identical to -Wl,-O1 so you can just ignore that.

Juanito:

--- Quote from: polikuo on February 12, 2022, 04:38:33 AM ---The comma is gone, so nothing is passed to the linker

--- Quote ---find . -name link.txt -type f -exec sed -i 's/-Wl,-O3/-Wl -Os/g' {} \;
--- End quote ---

--- End quote ---
Well spotted  :)


--- Quote ---What should I do with this ?

--- Quote ---[links against ncursesw without ncursesw-dev]
--- End quote ---

--- End quote ---
That was a note to remind me to add ncursesw to the dep file


--- Quote ---What about clang ?
It looks like llvm should be packed into multiple packages and I'm not sure what are they.

--- End quote ---
See llvm-bin, llvm-dev, llvm-lib and clang

polikuo:
Hi Juanito
I'm not quite sure which binaries should be in llvm-bin, llvm-dev or clang
It's pretty obvious for those with "llvm-" or "clang-" prefix, but the rest is messy.
Different port also has different layout. (comparing aarch64 and x86_64)
Any suggestions ?

--- Code: ---llvm-root/usr/local/bin/analyze-build
llvm-root/usr/local/bin/bugpoint
llvm-root/usr/local/bin/c-index-test
llvm-root/usr/local/bin/diagtool
llvm-root/usr/local/bin/dsymutil
llvm-root/usr/local/bin/hmaptool
llvm-root/usr/local/bin/intercept-build
llvm-root/usr/local/bin/llc
llvm-root/usr/local/bin/lli
llvm-root/usr/local/bin/opt
llvm-root/usr/local/bin/sancov
llvm-root/usr/local/bin/sanstats
llvm-root/usr/local/bin/scan-build
llvm-root/usr/local/bin/scan-build-py
llvm-root/usr/local/bin/scan-view
llvm-root/usr/local/bin/split-file
llvm-root/usr/local/bin/verify-uselistorder

--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version