mirror of
https://github.com/mtheall/ftpd.git
synced 2024-11-26 19:20:31 +00:00
LTO -O3 for release build
This commit is contained in:
parent
8aaf564138
commit
e8feca0175
14
Makefile
14
Makefile
@ -100,22 +100,22 @@ release: release-nds \
|
|||||||
@xz -c <switch-classic/ftpd-classic.nro >ftpd-classic.nro.xz
|
@xz -c <switch-classic/ftpd-classic.nro >ftpd-classic.nro.xz
|
||||||
|
|
||||||
release-nds:
|
release-nds:
|
||||||
@$(MAKE) -f Makefile.nds DEFINES=-DNDEBUG
|
@$(MAKE) -f Makefile.nds DEFINES=-DNDEBUG OPTIMIZE="-O3 -flto"
|
||||||
|
|
||||||
release-3dsx:
|
release-3dsx:
|
||||||
@$(MAKE) -f Makefile.3ds 3dsx DEFINES=-DNDEBUG
|
@$(MAKE) -f Makefile.3ds 3dsx DEFINES=-DNDEBUG OPTIMIZE="-O3 -flto"
|
||||||
|
|
||||||
release-3dsx-classic:
|
release-3dsx-classic:
|
||||||
@$(MAKE) -f Makefile.3ds 3dsx DEFINES=-DNDEBUG CLASSIC="-DCLASSIC"
|
@$(MAKE) -f Makefile.3ds 3dsx DEFINES=-DNDEBUG OPTIMIZE="-O3 -flto" CLASSIC="-DCLASSIC"
|
||||||
|
|
||||||
release-cia: release-3dsx
|
release-cia: release-3dsx
|
||||||
@$(MAKE) -f Makefile.3ds cia DEFINES=-DNDEBUG
|
@$(MAKE) -f Makefile.3ds cia DEFINES=-DNDEBUG OPTIMIZE="-O3 -flto"
|
||||||
|
|
||||||
release-cia-classic: release-3dsx-classic
|
release-cia-classic: release-3dsx-classic
|
||||||
@$(MAKE) -f Makefile.3ds cia DEFINES=-DNDEBUG CLASSIC="-DCLASSIC"
|
@$(MAKE) -f Makefile.3ds cia DEFINES=-DNDEBUG OPTIMIZE="-O3 -flto" CLASSIC="-DCLASSIC"
|
||||||
|
|
||||||
release-nro:
|
release-nro:
|
||||||
@$(MAKE) -f Makefile.switch all DEFINES=-DNDEBUG
|
@$(MAKE) -f Makefile.switch all DEFINES=-DNDEBUG OPTIMIZE="-O3 -flto"
|
||||||
|
|
||||||
release-nro-classic:
|
release-nro-classic:
|
||||||
@$(MAKE) -f Makefile.switch all DEFINES=-DNDEBUG CLASSIC="-DCLASSIC"
|
@$(MAKE) -f Makefile.switch all DEFINES=-DNDEBUG OPTIMIZE="-O3 -flto" CLASSIC="-DCLASSIC"
|
||||||
|
11
Makefile.3ds
11
Makefile.3ds
@ -43,24 +43,25 @@ SOURCES += source/imgui
|
|||||||
GRAPHICS := 3ds/gfx
|
GRAPHICS := 3ds/gfx
|
||||||
ROMFS := 3ds/romfs
|
ROMFS := 3ds/romfs
|
||||||
GFXBUILD := $(ROMFS)
|
GFXBUILD := $(ROMFS)
|
||||||
|
RSF_FILE := meta/ftpd-cia.rsf
|
||||||
else
|
else
|
||||||
APP_TITLE := ftpd classic
|
APP_TITLE := ftpd classic
|
||||||
TARGET := 3ds-classic/ftpd-classic
|
TARGET := 3ds-classic/ftpd-classic
|
||||||
BUILD := 3ds-classic/build
|
BUILD := 3ds-classic/build
|
||||||
|
RSF_FILE := meta/ftpd-classic-cia.rsf
|
||||||
endif
|
endif
|
||||||
|
|
||||||
APP_DESCRIPTION := v$(VERSION)
|
APP_DESCRIPTION := v$(VERSION)
|
||||||
APP_AUTHOR := mtheall
|
APP_AUTHOR := mtheall
|
||||||
|
|
||||||
ICON := meta/icon.png
|
ICON := meta/icon.png
|
||||||
BNR_IMAGE := meta/banner.png
|
BNR_IMAGE := meta/banner.png
|
||||||
BNR_AUDIO := meta/audio.wav
|
BNR_AUDIO := meta/audio.wav
|
||||||
RSF_FILE := meta/ftpd-cia.rsf
|
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# options for code generation
|
# options for code generation
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
OPTIMIZE := -O0
|
OPTIMIZE := -Og
|
||||||
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft
|
ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft
|
||||||
|
|
||||||
CFLAGS := -g -Wall $(OPTIMIZE) -mword-relocations \
|
CFLAGS := -g -Wall $(OPTIMIZE) -mword-relocations \
|
||||||
|
@ -40,16 +40,17 @@ GAME_SUBTITLE2 := (c) mtheall
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# options for code generation
|
# options for code generation
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
|
OPTIMIZE := -Og
|
||||||
ARCH := -marm -mthumb-interwork -march=armv5te -mtune=arm946e-s
|
ARCH := -marm -mthumb-interwork -march=armv5te -mtune=arm946e-s
|
||||||
|
|
||||||
CFLAGS := -g -Wall -Os \
|
CFLAGS := -g -Wall $(OPTIMIZE) \
|
||||||
$(ARCH) $(INCLUDE) -DARM9 -DNDS \
|
$(ARCH) $(INCLUDE) -DARM9 -DNDS \
|
||||||
-DSTATUS_STRING="\"ftpd v$(VERSION)\"" \
|
-DSTATUS_STRING="\"ftpd v$(VERSION)\"" \
|
||||||
-DIMGUI_DISABLE_INCLUDE_IMCONFIG_H=1 \
|
-DIMGUI_DISABLE_INCLUDE_IMCONFIG_H=1 \
|
||||||
-DNO_IPV6 -DCLASSIC
|
-DNO_IPV6 -DCLASSIC
|
||||||
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++17
|
CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++17
|
||||||
ASFLAGS := -g $(ARCH)
|
ASFLAGS := -g $(ARCH)
|
||||||
LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map)
|
LDFLAGS = -specs=ds_arm9.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) $(OPTIMIZE)
|
||||||
|
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# any extra libraries we wish to link with the project (order is important)
|
# any extra libraries we wish to link with the project (order is important)
|
||||||
|
@ -64,12 +64,12 @@ OUT_SHADERS := shaders
|
|||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
# options for code generation
|
# options for code generation
|
||||||
#---------------------------------------------------------------------------------
|
#---------------------------------------------------------------------------------
|
||||||
OPTIMIZE:= -Os
|
OPTIMIZE:= -Og
|
||||||
ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE
|
ARCH := -march=armv8-a+crc+crypto -mtune=cortex-a57 -mtp=soft -fPIE
|
||||||
|
|
||||||
CFLAGS := -g -Wall -Wno-narrowing $(OPTIMIZE) \
|
CFLAGS := -g -Wall -Wno-narrowing $(OPTIMIZE) \
|
||||||
-ffunction-sections -fdata-sections \
|
-ffunction-sections -fdata-sections \
|
||||||
$(ARCH) $(DEFINES) $(CLASSIC)
|
$(ARCH) $(DEFINES) $(CLASSIC) -DNO_IPV6
|
||||||
|
|
||||||
CFLAGS += $(INCLUDE) -D__SWITCH__ \
|
CFLAGS += $(INCLUDE) -D__SWITCH__ \
|
||||||
-DSTATUS_STRING="\"ftpd v$(VERSION)\"" \
|
-DSTATUS_STRING="\"ftpd v$(VERSION)\"" \
|
||||||
|
216
meta/ftpd-classic-cia.rsf
Normal file
216
meta/ftpd-classic-cia.rsf
Normal file
@ -0,0 +1,216 @@
|
|||||||
|
BasicInfo:
|
||||||
|
Title : "ftpd"
|
||||||
|
ProductCode : "ftpd"
|
||||||
|
Logo : Homebrew # Nintendo / Licensed / Distributed / iQue / iQueForSystem
|
||||||
|
|
||||||
|
TitleInfo:
|
||||||
|
Category : Application
|
||||||
|
UniqueId : 0xBEEF5
|
||||||
|
|
||||||
|
Option:
|
||||||
|
UseOnSD : true # true if App is to be installed to SD
|
||||||
|
FreeProductCode : true # Removes limitations on ProductCode
|
||||||
|
MediaFootPadding : false # If true CCI files are created with padding
|
||||||
|
EnableCrypt : false # Enables encryption for NCCH and CIA
|
||||||
|
EnableCompress : true # Compresses where applicable (currently only exefs:/.code)
|
||||||
|
|
||||||
|
AccessControlInfo:
|
||||||
|
CoreVersion : 2
|
||||||
|
|
||||||
|
# Exheader Format Version
|
||||||
|
DescVersion : 2
|
||||||
|
|
||||||
|
# Minimum Required Kernel Version (below is for 4.5.0)
|
||||||
|
ReleaseKernelMajor : "02"
|
||||||
|
ReleaseKernelMinor : "33"
|
||||||
|
|
||||||
|
# ExtData
|
||||||
|
UseExtSaveData : false # enables ExtData
|
||||||
|
#ExtSaveDataId : 0x300 # only set this when the ID is different to the UniqueId
|
||||||
|
|
||||||
|
# FS:USER Archive Access Permissions
|
||||||
|
# Uncomment as required
|
||||||
|
FileSystemAccess:
|
||||||
|
#- CategorySystemApplication
|
||||||
|
#- CategoryHardwareCheck
|
||||||
|
- CategoryFileSystemTool
|
||||||
|
#- Debug
|
||||||
|
#- TwlCardBackup
|
||||||
|
#- TwlNandData
|
||||||
|
#- Boss
|
||||||
|
- DirectSdmc
|
||||||
|
#- Core
|
||||||
|
#- CtrNandRo
|
||||||
|
#- CtrNandRw
|
||||||
|
#- CtrNandRoWrite
|
||||||
|
#- CategorySystemSettings
|
||||||
|
#- CardBoard
|
||||||
|
#- ExportImportIvs
|
||||||
|
#- DirectSdmcWrite
|
||||||
|
#- SwitchCleanup
|
||||||
|
#- SaveDataMove
|
||||||
|
#- Shop
|
||||||
|
#- Shell
|
||||||
|
#- CategoryHomeMenu
|
||||||
|
|
||||||
|
# Process Settings
|
||||||
|
MemoryType : Application # Application/System/Base
|
||||||
|
SystemMode : 64MB # 64MB(Default)/96MB/80MB/72MB/32MB
|
||||||
|
IdealProcessor : 0
|
||||||
|
AffinityMask : 1
|
||||||
|
Priority : 16
|
||||||
|
MaxCpu : 0x9E # Default
|
||||||
|
HandleTableSize : 0x200
|
||||||
|
DisableDebug : false
|
||||||
|
EnableForceDebug : false
|
||||||
|
CanWriteSharedPage : true
|
||||||
|
CanUsePrivilegedPriority : false
|
||||||
|
CanUseNonAlphabetAndNumber : true
|
||||||
|
PermitMainFunctionArgument : true
|
||||||
|
CanShareDeviceMemory : true
|
||||||
|
RunnableOnSleep : false
|
||||||
|
SpecialMemoryArrange : true
|
||||||
|
|
||||||
|
# New3DS Exclusive Process Settings
|
||||||
|
SystemModeExt : Legacy # Legacy(Default)/124MB/178MB Legacy:Use Old3DS SystemMode
|
||||||
|
CpuSpeed : 804MHz # 256MHz(Default)/804MHz
|
||||||
|
EnableL2Cache : true # false(default)/true
|
||||||
|
CanAccessCore2 : true
|
||||||
|
|
||||||
|
# Virtual Address Mappings
|
||||||
|
IORegisterMapping:
|
||||||
|
- 1ff00000-1ff7ffff # DSP memory
|
||||||
|
MemoryMapping:
|
||||||
|
- 1f000000-1f5fffff:r # VRAM
|
||||||
|
|
||||||
|
# Accessible SVCs, <Name>:<ID>
|
||||||
|
SystemCallAccess:
|
||||||
|
ArbitrateAddress: 34
|
||||||
|
Backdoor: 123
|
||||||
|
Break: 60
|
||||||
|
CancelTimer: 28
|
||||||
|
ClearEvent: 25
|
||||||
|
ClearTimer: 29
|
||||||
|
CloseHandle: 35
|
||||||
|
ConnectToPort: 45
|
||||||
|
ControlMemory: 1
|
||||||
|
ControlProcessMemory: 112
|
||||||
|
CreateAddressArbiter: 33
|
||||||
|
CreateEvent: 23
|
||||||
|
CreateMemoryBlock: 30
|
||||||
|
CreateMutex: 19
|
||||||
|
CreateSemaphore: 21
|
||||||
|
CreateThread: 8
|
||||||
|
CreateTimer: 26
|
||||||
|
DuplicateHandle: 39
|
||||||
|
ExitProcess: 3
|
||||||
|
ExitThread: 9
|
||||||
|
GetCurrentProcessorNumber: 17
|
||||||
|
GetHandleInfo: 41
|
||||||
|
GetProcessId: 53
|
||||||
|
GetProcessIdOfThread: 54
|
||||||
|
GetProcessIdealProcessor: 6
|
||||||
|
GetProcessInfo: 43
|
||||||
|
GetResourceLimit: 56
|
||||||
|
GetResourceLimitCurrentValues: 58
|
||||||
|
GetResourceLimitLimitValues: 57
|
||||||
|
GetSystemInfo: 42
|
||||||
|
GetSystemTick: 40
|
||||||
|
GetThreadContext: 59
|
||||||
|
GetThreadId: 55
|
||||||
|
GetThreadIdealProcessor: 15
|
||||||
|
GetThreadInfo: 44
|
||||||
|
GetThreadPriority: 11
|
||||||
|
MapMemoryBlock: 31
|
||||||
|
OutputDebugString: 61
|
||||||
|
QueryMemory: 2
|
||||||
|
ReleaseMutex: 20
|
||||||
|
ReleaseSemaphore: 22
|
||||||
|
SendSyncRequest1: 46
|
||||||
|
SendSyncRequest2: 47
|
||||||
|
SendSyncRequest3: 48
|
||||||
|
SendSyncRequest4: 49
|
||||||
|
SendSyncRequest: 50
|
||||||
|
SetThreadPriority: 12
|
||||||
|
SetTimer: 27
|
||||||
|
SignalEvent: 24
|
||||||
|
SleepThread: 10
|
||||||
|
UnmapMemoryBlock: 32
|
||||||
|
WaitSynchronization1: 36
|
||||||
|
WaitSynchronizationN: 37
|
||||||
|
|
||||||
|
# Service List
|
||||||
|
# Maximum 34 services (32 if firmware is prior to 9.6.0)
|
||||||
|
ServiceAccessControl:
|
||||||
|
- APT:U
|
||||||
|
- ac:u
|
||||||
|
- am:net
|
||||||
|
- boss:U
|
||||||
|
- cam:u
|
||||||
|
- cecd:u
|
||||||
|
- cfg:nor
|
||||||
|
- cfg:u
|
||||||
|
- csnd:SND
|
||||||
|
- dsp::DSP
|
||||||
|
- frd:u
|
||||||
|
- fs:USER
|
||||||
|
- gsp::Gpu
|
||||||
|
- gsp::Lcd
|
||||||
|
- hid:USER
|
||||||
|
- http:C
|
||||||
|
- ir:rst
|
||||||
|
- ir:u
|
||||||
|
- ir:USER
|
||||||
|
- mic:u
|
||||||
|
- ndm:u
|
||||||
|
- news:u
|
||||||
|
- nwm::UDS
|
||||||
|
- ptm:u
|
||||||
|
- pxi:dev
|
||||||
|
- soc:U
|
||||||
|
- ssl:C
|
||||||
|
- y2r:u
|
||||||
|
|
||||||
|
|
||||||
|
SystemControlInfo:
|
||||||
|
SaveDataSize: 0KB # Change if the app uses savedata
|
||||||
|
RemasterVersion: $(VERSION_MAJOR)
|
||||||
|
StackSize: 0x40000
|
||||||
|
|
||||||
|
# Modules that run services listed above should be included below
|
||||||
|
# Maximum 48 dependencies
|
||||||
|
# <module name>:<module titleid>
|
||||||
|
Dependency:
|
||||||
|
ac: 0x0004013000002402
|
||||||
|
#act: 0x0004013000003802
|
||||||
|
am: 0x0004013000001502
|
||||||
|
boss: 0x0004013000003402
|
||||||
|
camera: 0x0004013000001602
|
||||||
|
cecd: 0x0004013000002602
|
||||||
|
cfg: 0x0004013000001702
|
||||||
|
codec: 0x0004013000001802
|
||||||
|
csnd: 0x0004013000002702
|
||||||
|
dlp: 0x0004013000002802
|
||||||
|
dsp: 0x0004013000001a02
|
||||||
|
friends: 0x0004013000003202
|
||||||
|
gpio: 0x0004013000001b02
|
||||||
|
gsp: 0x0004013000001c02
|
||||||
|
hid: 0x0004013000001d02
|
||||||
|
http: 0x0004013000002902
|
||||||
|
i2c: 0x0004013000001e02
|
||||||
|
ir: 0x0004013000003302
|
||||||
|
mcu: 0x0004013000001f02
|
||||||
|
mic: 0x0004013000002002
|
||||||
|
ndm: 0x0004013000002b02
|
||||||
|
news: 0x0004013000003502
|
||||||
|
#nfc: 0x0004013000004002
|
||||||
|
nim: 0x0004013000002c02
|
||||||
|
nwm: 0x0004013000002d02
|
||||||
|
pdn: 0x0004013000002102
|
||||||
|
ps: 0x0004013000003102
|
||||||
|
ptm: 0x0004013000002202
|
||||||
|
#qtm: 0x0004013020004202
|
||||||
|
ro: 0x0004013000003702
|
||||||
|
socket: 0x0004013000002e02
|
||||||
|
spi: 0x0004013000002302
|
||||||
|
ssl: 0x0004013000002f02
|
Loading…
Reference in New Issue
Block a user