Skip to content

Commit

Permalink
save
Browse files Browse the repository at this point in the history
  • Loading branch information
AskAlexSharov committed Dec 21, 2024
1 parent 3fdda83 commit 7cade6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,6 @@ cp:
cp mdbxdist/mdbx.h mdbx/
cp mdbxdist/mdbx.c mdbx/
#add 1 line to mdbx.h about build flags which we have in `mdbx.go`
echo "$(echo '#ifndef MDBX_BUILD_FLAGS'; cat mdbx/mdbx.h)" > mdbx/mdbx.h
echo "$(echo '#define MDBX_BUILD_FLAGS "-std=gnu11 -fvisibility=hidden -ffast-math"'; cat mdbx/mdbx.h)" > mdbx/mdbx.h
echo "$(echo '#endif'; cat mdbx/mdbx.h)" > mdbx/mdbx.h
5 changes: 4 additions & 1 deletion mdbx/mdbx.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#ifndef MDBX_BUILD_FLAGS
#define MDBX_BUILD_FLAGS "-std=gnu11 -fvisibility=hidden -ffast-math"
#endif

/**
_libmdbx_ (aka MDBX) is an extremely fast, compact, powerful, embeddable,
Expand Down Expand Up @@ -38,7 +42,6 @@ credits and acknowledgments.
#pragma once
#ifndef LIBMDBX_H
#define LIBMDBX_H
#define MDBX_BUILD_FLAGS "-std=gnu11 -fvisibility=hidden -ffast-math"

#if defined(__riscv) || defined(__riscv__) || defined(__RISCV) || defined(__RISCV__)
#warning "The RISC-V architecture is intentionally insecure by design. \
Expand Down

0 comments on commit 7cade6f

Please sign in to comment.