In some ports, there are configure arguments
and/ or CPU ISA architecture specifics. Today,
we will learn to adapt the port for both.
Look at the port and download with git, wget,
or another command line utility.
Search for the configure file. Even if you do
not like this next suggestion, use it to read
the entire configure file. cat $CONFIGURE_FILE
| more. Note that some build systems will
require you to create a document beforehand.
Search for the following: architecture
dependent flags. Disable these when necessary
in the ports Makefile. If your chosen
architecture is not in the file, then add it
in the configure file and add for architecture
$SUCH_AND_SUCH to the port Makefile.
Whatever arguments that you want in the
configure file that are not arguments in the
port Makefile, add those to the already
existing arguments. SIMD arguments are
CPU ISA specific, adapt to use whatever is
on the CPU of your chosen or available
architecture.
Do not patch. Rewrite and save. Let the
upstream maintainers know what you did.
If the build fails, rebuild and tee the output
to a text file. Use the cat $FILENAME |more
so you can see where the error is. If the
operating system team requires certain
code standards, then follow them. They
have a very good reason for doing such.
It is better to build on bare metal than
use a virtual machine or cross compile.
Those two options will not show you
real world errors.
When porting your own or others' software,
if the source is not open source then do not
bother. They have their reasons. Make yours
available to the public. If it is open source and
people find vulnerabilities and/ or exploits,
you will know what to fix. Tell them,
"Thank you."
The more operating systems that you port to
and the more CPU ISA architectures you also
port to, the more users, eyes, and ears.
Do it yourself by hand and accept your
errors and mistakes. This will teach and
assist you in better coding and development.
Take and accept a challenge. If it will compile
on the most difficult environments, then it
will definitely compile on the most common.
Enjoy and happy positive hacking.
No comments:
Post a Comment
Thank you for expressing yourself. Have a blessed day.