For GCC, this is just one option, not two:
-Wl,-R`pwd`
The -Wl,<something> construct is used to pass the <something> part as option(s) to the linker (ld). In this case, it tells gcc to invoke ld as:
ld -R`pwd` <other parameters...>
And if you look at man ld in Linux, you'll find (emphasis mine):
-R filename
[...]
Read symbol names and their addresses from filename, but do not relocate it or include it in the output. This allows your output file to refer symbolically to absolute locations of memory defined in other programs. You may use this option more than once.
For compatibility with other ELF linkers, if the -R option is followed by a directory name, rather than a file name, it is treated as the -rpath option.
And the -rpath option is:
-rpath=dir
Add a directory to the runtime library search path. This is used when linking an ELF executable with shared objects. All -rpath arguments are concatenated and passed to the runtime linker, which uses them to locate shared objects at runtime. [...]
So the entire construct means "tell the runtime linker to search shared objects for linking in the current working directory".
The ld man page also notes:
The -rpath option may also be used on SunOS. By default, on SunOS, the linker will form a runtime search path out of all the -L options it is given. If a -rpath option is used, the runtime search path will be formed exclusively using the -rpath options, ignoring the -L options. This can be useful when using gcc, which adds many -L options which may be on NFS mounted file systems.
So, the overall goal for this option construct in e.g.
cc -g -c -o main.o main.c
cc -g -fpic -c -o power_slow.po power_slow.c
cc -shared -fpic -o libpowerslow.so power_slow.po
cc main.o -L`pwd` -Wl,-R`pwd` -lpowerslow -o main
is to ensure the resulting main binary will search for libpowerslow.so only in the current working directory, so it will pick the exact version compiled by the third command, and not any other version of libpowerslow.so that might exist elsewhere on the system.
You should realize that while "baking in" the current working directory is useful with short-lived example binaries like the one built here, you should specify something else as the runtime library search path when building something to be installed for system-wide use.