Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update winbuild.sh #1933

Closed
wants to merge 4 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions buildscripts/winbuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -134,27 +134,27 @@ function build_dll(){
cd src/bitmsghash || exit 1
if [ "${MACHINE_TYPE}" == 'x86_64' ]; then
echo "Create dll"
x86_64-w64-mingw32-g++ -D_WIN32 -Wall -O3 -march=native \
x86_64-w64-mingw32-g++ -D_WIN32 -Wall -O3 -march=x86-64 \
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why not just remove?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that not what the minus signs indicate?

I sure didn't intend to leave "march=native" so hopefully github is not doing that.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, aren't those values the defaults, that will be applied if you just remove the -march=native? Though maybe it's better to set that explicitly.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It turns out that there is no default value for the march option.

There is no default in general, because it's platform-specific.

https://gcc-help.gcc.gnu.narkive.com/Z259fPcD/default-value-for-march-option

Though you can find what your platform will use as default (if it is not specified) with the command:

gcc -Q --help=target

https://stackoverflow.com/questions/27786932/what-is-the-default-for-gcc-march-option

"-I$HOME/.wine64/drive_c/OpenSSL-Win64/include" \
-I/usr/x86_64-w64-mingw32/include \
"-L$HOME/.wine64/drive_c/OpenSSL-Win64/lib" \
-c bitmsghash.cpp
x86_64-w64-mingw32-g++ -static-libgcc -shared bitmsghash.o \
-D_WIN32 -O3 -march=native \
-D_WIN32 -O3 -march=x86-64 \
"-I$HOME/.wine64/drive_c/OpenSSL-Win64/include" \
"-L$HOME/.wine64/drive_c/OpenSSL-Win64" \
-L/usr/lib/x86_64-linux-gnu/wine \
-fPIC -shared -lcrypt32 -leay32 -lwsock32 \
-o bitmsghash64.dll -Wl,--out-implib,bitmsghash.a
else
echo "Create dll"
i686-w64-mingw32-g++ -D_WIN32 -Wall -m32 -O3 -march=native \
i686-w64-mingw32-g++ -D_WIN32 -Wall -m32 -O3 -march=i686 \
"-I$HOME/.wine32/drive_c/OpenSSL-Win32/include" \
-I/usr/i686-w64-mingw32/include \
"-L$HOME/.wine32/drive_c/OpenSSL-Win32/lib" \
-c bitmsghash.cpp
i686-w64-mingw32-g++ -static-libgcc -shared bitmsghash.o \
-D_WIN32 -O3 -march=native \
-D_WIN32 -O3 -march=i686 \
"-I$HOME/.wine32/drive_c/OpenSSL-Win32/include" \
"-L$HOME/.wine32/drive_c/OpenSSL-Win32/lib/MinGW" \
-fPIC -shared -lcrypt32 -leay32 -lwsock32 \
Expand Down